/* ============================================================
   CpuHost · UI  (Cloudflare-inspired)
   橙色主色 / 白底细边框 / 小圆角 / 弱阴影 / 粗体标题
   ============================================================ */

:root {
  --bg: #f7f7f8;
  --bg-2: #ededef;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --line: #e5e5e7;
  --line-2: #f0f0f1;

  --ink: #1d1d1d;
  --ink-2: #55555a;
  --ink-3: #8c8c93;

  --brand: #f6821f;
  --brand-2: #dd6f0b;
  --brand-soft: #fff3e8;
  --brand-ink: #b45309;

  --ok: #12805c;
  --ok-soft: #e7f7f0;
  --warn: #b54708;
  --warn-soft: #fdf4e3;
  --danger: #c0392b;
  --danger-soft: #fdf1ef;

  --radius: 10px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  --shadow-xs: 0 1px 1px rgba(16, 24, 40, .03);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 8px 20px -12px rgba(16, 24, 40, .18);
  --shadow-lg: 0 18px 36px -20px rgba(16, 24, 40, .22);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.28; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: 28px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-ink); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-2); text-decoration: underline; text-underline-offset: 2px; }

code, .kbd {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--ink-2);
  word-break: break-all;
}

hr { border: 0; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* ---------- layout ---------- */
.wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.main { padding: 34px 0 72px; min-height: 62vh; }

/* 页面首块是 hero 时，去掉 main 的顶部内边距，避免与 hero 自身 padding 叠加 */
.main:has(> .hero:first-child),
.main:has(> .home-hero:first-child),
.main:has(> .page-hero:first-child) {
  padding-top: 0;
}
.page-title { font-size: 24px; margin-bottom: 22px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-between {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.muted { color: var(--ink-3); font-size: 13.5px; }
.nowrap { white-space: nowrap; }
.mt-3 { margin-top: 16px; }
.inline { display: inline; }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }
.text-warn { color: var(--warn); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar::before {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--brand), #ffab5e);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 62px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; color: var(--ink); letter-spacing: -.02em;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.logo {
  width: 30px; height: 30px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 800;
}

.links { display: flex; align-items: center; gap: 2px; font-size: 14px; }
.links > a {
  color: var(--ink-2); padding: 8px 12px; border-radius: var(--radius-xs);
  font-weight: 500; transition: background .15s, color .15s;
}
.links > a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.links > a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }

.nav-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--brand-soft); color: var(--brand-ink); flex: none;
}
.nav-user .who { display: flex; flex-direction: column; line-height: 1.25; }
.nav-user .who b { font-size: 13.5px; font-weight: 600; }
.nav-user .who span { font-size: 12px; color: var(--ink-3); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: #d4d4d7; color: var(--ink); text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }

.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }

.btn-danger { color: var(--danger); border-color: #f0cfc9; background: var(--surface); }
.btn-danger:hover { background: var(--danger-soft); border-color: #e2b3aa; color: var(--danger); }

/* 编辑 / 修改类操作：蓝色，与删除（红）明确区分 */
.btn-edit { color: #1d4ed8; border-color: #c9d8f8; background: var(--surface); }
.btn-edit:hover { background: #eff4ff; border-color: #aec6f2; color: #1d4ed8; }

.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.card > h2:first-child { margin-top: 0; }
.card-body { padding: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 72px 0 46px; }
.hero-compact { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(32px, 4.4vw, 46px); letter-spacing: -.03em; color: var(--ink); }
.hero p { color: var(--ink-2); max-width: 640px; margin: 16px auto 28px; font-size: 16.5px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-badges {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-top: 28px; font-size: 12.5px; color: var(--ink-2);
}
.hero-badges span {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 999px;
}

/* ---------- home hero ---------- */
.home-hero { text-align: center; padding: 76px 0 40px; }
.home-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -.035em; line-height: 1.1;
  color: var(--ink); margin: 18px 0 0;
}
.home-hero p { color: var(--ink-2); max-width: 660px; margin: 20px auto 30px; font-size: 17px; }
.home-hero .hero-note { margin-top: 20px; font-size: 12.8px; color: var(--ink-3); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-ink); background: var(--brand-soft);
  border: 1px solid #f6d4b4; border-radius: 999px; padding: 4px 12px;
}
.eyebrow-sm { font-size: 11px; padding: 3px 10px; }

/* 数据条 */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  margin: 8px auto 0; max-width: 1000px;
}
.stat-strip-item {
  background: var(--surface); padding: 22px 18px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-strip-item strong { font-size: 24px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.stat-strip-item span { font-size: 12.5px; color: var(--ink-3); }

/* 底部 CTA 横幅 */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(120deg, #1d1d1d, #2e2e2e);
  color: #fff; border-radius: var(--radius); padding: 34px 36px; margin-top: 40px;
}
.cta-band h2 { color: #fff; font-size: 24px; letter-spacing: -.02em; margin-bottom: 6px; }
.cta-band p { color: #c9c9cc; margin: 0; font-size: 14px; }
.cta-band .btn { border-color: rgba(255,255,255,.35); background: transparent; color: #fff; }
.cta-band .btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.55); color: #fff; }
.cta-band .btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.cta-band .btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }

/* ---------- section ---------- */
.section-head { text-align: center; margin: 60px 0 28px; }
.section-head h2 { font-size: 26px; letter-spacing: -.03em; margin-top: 10px; }
.section-head p { color: var(--ink-2); margin: 8px 0 0; }
.section-left { text-align: left; }

/* 内页头 */
.page-hero { text-align: center; padding: 56px 0 36px; }
.page-hero h1 { font-size: clamp(28px, 3.6vw, 38px); letter-spacing: -.03em; margin: 16px 0 0; color: var(--ink); }
.page-hero p { color: var(--ink-2); max-width: 660px; margin: 16px auto 0; font-size: 16px; }

/* 首页套餐引导卡 */
.plans-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 26px 28px;
}
.plans-entry h3 { margin-bottom: 4px; font-size: 18px; }
.plans-entry p { margin: 0; }

/* ---------- features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.feature .fi {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 14px; font-weight: 800; margin-bottom: 14px;
}
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 13.8px; margin: 0; }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.plan-card {
  position: relative; display: flex; flex-direction: column; margin: 0;
  transition: border-color .2s, box-shadow .2s;
}
.plan-card:hover { border-color: #cfcfd3; box-shadow: var(--shadow-md); }
.plan-card.plan-paid { border-color: #f6cfa8; }
.plan-card h3 { margin-bottom: 2px; font-size: 17px; }
.plan-tag {
  position: absolute; top: 18px; right: 18px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line);
}
.plan-paid .plan-tag { background: var(--brand-soft); color: var(--brand-ink); border-color: #f6d4b4; }
.plan-price { font-size: 32px; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 16px; }
.plan-price small { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.plan-features { list-style: none; padding: 0; margin: 0 0 20px; font-size: 13.8px; color: var(--ink-2); }
.plan-features li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--line-2);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before {
  content: "✓"; color: var(--ok); font-weight: 800; font-size: 11px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--ok-soft);
  display: grid; place-items: center; flex: none;
}
.plan-card .btn { margin-top: auto; }
.plan-edit .grid-3 { margin-bottom: 14px; }

/* ---------- stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 18px 20px; }
.stat span { color: var(--ink-3); font-size: 12.5px; font-weight: 500; }
.stat strong { font-size: 27px; font-weight: 800; letter-spacing: -.03em; }
.stat .stat-sub { font-size: 12px; color: var(--ink-3); }
.stat-accent { background: #fffaf5; border-color: #f6e0c8; }
.stat-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge-active { background: var(--ok-soft); color: var(--ok); border-color: #c6ebdd; }
.badge-pending { background: var(--brand-soft); color: var(--brand-ink); border-color: #f6d4b4; }
.badge-suspended, .badge-expired { background: var(--warn-soft); color: var(--warn); border-color: #f2dfba; }
.badge-deleted { background: var(--danger-soft); color: var(--danger); border-color: #f2cdc6; }

/* ---------- alerts ---------- */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.8px;
  margin-bottom: 16px; border: 1px solid transparent; line-height: 1.6;
}
.alert-ok { background: var(--ok-soft); border-color: #c6ebdd; color: #0b6b4b; }
.alert-error { background: var(--danger-soft); border-color: #f2cdc6; color: #912018; }
.alert a { font-weight: 600; text-decoration: underline; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.field > span { font-weight: 600; color: var(--ink-2); }
.input {
  width: 100%; padding: 10px 13px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-size: 14px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(246, 130, 31, .16);
}
textarea.input { resize: vertical; font-family: var(--mono); font-size: 12.8px; line-height: 1.6; }
select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px;
}
/* 文件选择框 */
input[type="file"].input {
  padding: 6px 8px;
  line-height: 1.5;
  cursor: pointer;
}
input[type="file"].input::file-selector-button {
  margin-right: 12px;
  padding: 7px 14px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-xs);
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
input[type="file"].input::file-selector-button:hover {
  background: var(--brand-2);
  border-color: var(--brand-2);
}
input[type="file"].input::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 7px 14px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-xs);
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.hint { color: var(--ink-3); font-size: 12.3px; line-height: 1.55; }
.field-hint { color: var(--ink-3); font-size: 12.3px; line-height: 1.55; margin: 0; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.8px; white-space: nowrap; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table th { color: var(--ink-3); font-weight: 600; font-size: 12px; letter-spacing: .02em; background: var(--surface-2); }
.table td.wrap, .table th.wrap { white-space: normal; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: none; }
.cell-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- progress ---------- */
.bar { height: 7px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin-bottom: 14px; }
.bar-inner { height: 100%; border-radius: 999px; background: var(--brand); transition: width .4s ease; }
.usage-row { display: flex; justify-content: space-between; font-size: 12.8px; color: var(--ink-2); margin-bottom: 5px; }
.usage-row b { font-weight: 600; color: var(--ink); }

/* ---------- host cards ---------- */
.host-list { display: grid; gap: 18px; margin-bottom: 18px; }
.host-card { margin: 0; }
.host-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.host-head h3 { margin-bottom: 2px; font-size: 17px; letter-spacing: -.01em; }
.host-usage { margin: 18px 0 0; }
.host-badges { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.host-progress { padding: 10px 16px; background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 12px; }
.host-progress .hint { margin: 6px 0 0; }
.host-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
.host-actions > form { margin: 0; }
.host-actions .btn { min-height: 34px; }

/* ---------- admin orders ---------- */
.filter-bar {
  display: grid; grid-template-columns: 180px 180px minmax(200px, 1fr) auto;
  gap: 14px; align-items: end;
}
.filter-bar .btn-row { align-items: center; padding-bottom: 1px; }
.order-detail summary { list-style: none; cursor: pointer; display: inline-flex; }
.order-detail summary::-webkit-details-marker { display: none; }
.order-detail[open] summary { background: var(--surface-2); }
.order-detail-body {
  position: absolute; right: 24px; z-index: 20; width: 340px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 16px;
  box-shadow: var(--shadow-md);
}
.order-detail-body .order-row { font-size: 13px; padding: 6px 0; }
.order-detail { position: relative; }

@media (max-width: 900px) {
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .order-detail-body { right: 0; width: min(320px, 82vw); }
}

/* ---------- balance / upgrade ---------- */
.balance-card { display: flex; flex-direction: column; gap: 4px; }
.balance-amount { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--brand-ink); }
.balance-card .hint { margin: 6px 0 0; }
.upgrade-quote { margin: 4px 0 14px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.upgrade-quote .usage-row:last-child { margin-bottom: 0; }

.domain-box {
  margin-top: 16px; padding: 14px 16px;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.domain-list { list-style: none; padding: 0; margin: 8px 0 10px; font-size: 13.6px; }
.domain-list li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-2);
}
.domain-list li:last-child { border-bottom: none; }
.domain-list em { font-style: normal; font-size: 11px; }
.bind-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.bind-form .input { flex: 1; min-width: 170px; }

/* ---------- code editor ---------- */
.code-editor {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  tab-size: 4;
  -moz-tab-size: 4;
  white-space: pre;
  overflow: auto;
  resize: vertical;
  min-height: 420px;
  background: #fbfbfc;
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  font-size: 13.2px; color: var(--ink-3); margin-bottom: 16px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--brand-ink); }

.upload-form { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.upload-form .input { flex: 1; min-width: 190px; }

/* ---------- empty ---------- */
.empty-box { text-align: center; padding: 52px 24px; }
.empty-box .empty-icon {
  width: 54px; height: 54px; border-radius: var(--radius); margin: 0 auto 14px;
  display: grid; place-items: center; font-size: 20px; font-weight: 800;
  background: var(--brand-soft); color: var(--brand-ink);
}
.empty-box h3 { margin-bottom: 6px; }
.empty-box p { color: var(--ink-3); font-size: 13.8px; }

/* ---------- order ---------- */
.order-summary { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 18px; background: var(--surface-2); margin: 16px 0; }
.order-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.order-row:last-child { border-bottom: none; }
.order-row span { color: var(--ink-3); }
.order-row.total { font-size: 17px; }
.order-row.total b { color: var(--brand-ink); font-size: 20px; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.qr-card { text-align: center; }
.qr-box { display: inline-flex; padding: 14px; border-radius: var(--radius-sm); background: #fff; margin: 16px 0; border: 1px solid var(--line); }
.done-icon { width: 58px; height: 58px; border-radius: 50%; margin: 6px auto 14px; display: grid; place-items: center; font-size: 26px; font-weight: 800; }
.done-icon.ok { background: var(--ok-soft); color: var(--ok); }
.done-icon.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- help / onboarding ---------- */
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.help-card { margin: 0; }
.help-card .help-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.help-card .help-num {
  width: 26px; height: 26px; border-radius: var(--radius-xs); flex: none;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 800;
  background: var(--brand-soft); color: var(--brand-ink);
}
.help-card h3 { margin: 0; font-size: 14.5px; }
.help-card p { color: var(--ink-2); font-size: 13.4px; margin: 0; }
.help-card ol, .help-card ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13.4px; }
.help-card li { margin-bottom: 4px; }

/* ---------- blog list & article ---------- */
.post-list { display: flex; flex-direction: column; gap: 14px; }
.post-card { margin: 0; padding: 24px 26px; transition: border-color .18s ease, box-shadow .18s ease; }
.post-card:hover { border-color: #cfcfd3; box-shadow: var(--shadow-md); }
.post-meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.post-title { font-size: 19px; margin: 0 0 8px; letter-spacing: -.02em; }
.post-title a { color: var(--ink); text-decoration: none; }
.post-title a:hover { color: var(--brand-ink); text-decoration: none; }
.post-summary { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; }
.post-more { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.post-more:hover { text-decoration: underline; text-underline-offset: 2px; }

.article-wrap { max-width: 760px; margin: 0 auto; }
.article-back { margin-bottom: 14px; }
.article-foot { margin-top: 10px; }
.article { padding: 32px 36px; }
.article-meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }
.article-head h1 { font-size: 26px; margin: 0 0 10px; }
.article-lead { color: var(--ink-2); font-size: 15px; margin: 0 0 4px; }
.article-body {
  margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-2);
  color: var(--ink); font-size: 14.8px;
}
.article-body h2 { font-size: 17px; margin: 26px 0 10px; padding-left: 10px; border-left: 3px solid var(--brand); }
.article-body h2:first-child { margin-top: 0; }
.article-body p { margin: 0 0 12px; color: var(--ink-2); }
.article-body ul, .article-body ol { margin: 0 0 14px; padding-left: 20px; color: var(--ink-2); }
.article-body li { margin-bottom: 6px; }
.article-body code {
  font-family: var(--mono); font-size: 12.8px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--brand-ink);
}

/* ---------- tip ---------- */
.tip {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fffaf5; border: 1px solid #f6e0c8; border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 13.6px; color: var(--ink-2);
}
.tip .tip-i { flex: none; font-size: 15px; font-weight: 800; color: var(--brand-ink); line-height: 1.4; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 16px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 14px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 700; font-size: 17px; }
.faq details[open] summary::after { content: "−"; }
.faq .faq-body { padding: 0 0 14px; color: var(--ink-2); font-size: 13.6px; }

/* ---------- steps ---------- */
.steps { display: grid; gap: 0; }
.step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.step:last-child { border-bottom: none; }
.step-ico {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 800;
  background: var(--brand); color: #fff;
}
.step-body h4 { margin: 0 0 2px; font-size: 14px; }
.step-body p { margin: 0; color: var(--ink-2); font-size: 13.4px; }

/* ---------- auth ---------- */
.auth-body {
  display: grid; place-items: center; min-height: 100vh; padding: 28px;
  background:
    radial-gradient(900px 460px at 82% -6%, #fff1e3 0%, transparent 62%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow-md);
}
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; margin-bottom: 24px; }
.auth-card h2 { font-size: 22px; margin-bottom: 18px; }
.auth-alt { font-size: 13.4px; color: var(--ink-3); margin-top: 18px; text-align: center; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 28px 0; color: var(--ink-3); font-size: 12.8px;
}
.footer-grid { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--brand-ink); }

/* ---------- admin ---------- */
.admin-bar .logo { background: var(--ink); }
.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-side {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; position: sticky; top: 86px;
}
.admin-side a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: var(--radius-xs); color: var(--ink-2);
  font-size: 13.8px; font-weight: 500; margin-bottom: 2px;
}
.admin-side a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.admin-side a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.admin-side .side-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); padding: 10px 12px 4px; font-weight: 700;
}

/* ---------- member center ---------- */
.member-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.member-side {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; position: sticky; top: 86px;
}
.member-side a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: var(--radius-xs); color: var(--ink-2);
  font-size: 13.8px; font-weight: 500; margin-bottom: 2px;
}
.member-side a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.member-side a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.member-side .side-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); padding: 10px 12px 4px; font-weight: 700;
}
.member-main > .page-title:first-child { margin-top: 0; }

/* ---------- signin ---------- */
.signin-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px;
  align-items: center; background: #fffaf5;
  border: 1px solid #f6e0c8; border-radius: var(--radius); padding: 24px;
}
.signin-hero h2 { margin: 0 0 6px; font-size: 20px; }
.signin-hero p { margin: 0; color: var(--ink-2); font-size: 13.6px; }
.signin-streak { display: flex; gap: 22px; margin-top: 14px; }
.signin-streak .k { font-size: 12px; color: var(--ink-3); }
.signin-streak .v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.signin-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.signin-day {
  border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 10px 6px;
  text-align: center; background: var(--surface);
}
.signin-day.done { background: var(--ok-soft); border-color: #c6ebdd; }
.signin-day.today { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(246, 130, 31, .16); }
.signin-day .d { font-size: 11px; color: var(--ink-3); }
.signin-day .n { font-size: 15px; font-weight: 700; }

/* ---------- pills ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 12.5px; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px;
}

/* ---------- inline edit (details) ---------- */
.db-pwd-edit summary,
.card details > summary.btn { list-style: none; cursor: pointer; }
.db-pwd-edit summary::-webkit-details-marker,
.card details > summary.btn::-webkit-details-marker { display: none; }
.db-pwd-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; min-width: 230px; }
.db-pwd-form .input { width: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .admin-shell, .member-shell { grid-template-columns: 1fr; }
  .admin-side, .member-side { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .admin-side .side-label, .member-side .side-label { display: none; }
  .admin-side a, .member-side a { white-space: nowrap; margin-bottom: 0; }
  .signin-hero { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 28px); }
  .nav { height: 56px; }
  .links { gap: 2px; font-size: 13px; overflow-x: auto; }
  .links > a { padding: 7px 9px; }
  .nav-user .who { display: none; }
  .hero { padding: 46px 0 34px; }
  .hero p { font-size: 15px; }
  .main { padding: 24px 0 56px; }
  h1 { font-size: 23px; }
  .page-title { font-size: 20px; }
  .article { padding: 24px 20px; }
  .section-head { margin: 44px 0 22px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { padding: 26px 22px; }
  .home-hero { padding: 52px 0 30px; }
}

@media (max-width: 480px) {
  .grid-3, .stat-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .post-card { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
