/* ==========================================================================
   简墨 API 平台 - 共享设计系统
   视觉风格参考 Node.js 中文网 (nodejs.p2hp.com)
   主色: Node 绿 #68A063 / 深绿 #215732 / 强调 #43853d
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --green-900: #1a3a2a;
  --green-800: #215732;
  --green-700: #2f6b3e;
  --green-600: #43853d;
  --green-500: #68a063;
  --green-400: #8cc178;
  --green-100: #eaf4ea;
  --green-050: #f3f9f3;

  --ink: #2d3a2e;
  --text: #333;
  --muted: #6b7a6e;
  --line: #e4e8e4;
  --bg: #ffffff;
  --bg-soft: #f7f9f7;
  --bg-card: #ffffff;

  --danger: #d33;
  --danger-bg: #fdecec;
  --warn: #d9882b;
  --warn-bg: #fdf3e6;
  --info: #2b7fd9;
  --info-bg: #eaf3fc;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow: 0 2px 10px rgba(33, 87, 50, 0.08);
  --shadow-md: 0 6px 24px rgba(33, 87, 50, 0.12);
  --shadow-lg: 0 16px 48px rgba(33, 87, 50, 0.16);
  --container: 1160px;
  --header-h: 64px;
  --font: "Source Sans Pro", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", "Fira Code", Consolas, monospace;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-600); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); }

/* ---------- 布局容器 ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .78rem; }
.text-lg { font-size: 1.15rem; }
.fw-700 { font-weight: 700; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--green-800);
  border-bottom: 3px solid var(--green-600);
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; font-size: 1.25rem; }
.brand:hover { color: #fff; }
.brand .logo {
  width: 38px; height: 38px; flex: none;
  background: var(--green-500);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1.1rem;
}
.brand small { display: block; font-size: .7rem; font-weight: 400; opacity: .8; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: rgba(255,255,255,.85); padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: .95rem; transition: all .2s;
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.12); }
.main-nav a.active { background: rgba(255,255,255,.18); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-family: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: all .2s; text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--green-600); color: #fff; }
.btn-primary:hover { background: var(--green-700); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-green { background: var(--green-500); color: #fff; }
.btn-green:hover { background: var(--green-600); color: #fff; }
.btn-dark { background: var(--green-800); color: #fff; }
.btn-dark:hover { background: var(--green-900); color: #fff; }
.btn-outline { background: transparent; border-color: var(--green-600); color: var(--green-700); }
.btn-outline:hover { background: var(--green-100); color: var(--green-800); }
.btn-ghost { background: transparent; color: var(--green-700); }
.btn-ghost:hover { background: var(--green-100); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b32424; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.form-label .req { color: var(--danger); }
.form-control {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; color: var(--text); background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(104,160,99,.18); }
.form-control::placeholder { color: #aab; }
textarea.form-control { min-height: 96px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7a6e' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input-group { display: flex; gap: 8px; }
.input-group .form-control { flex: 1; }
.form-hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { display: none; }
.switch .track { width: 42px; height: 24px; border-radius: 12px; background: #cdd6cd; position: relative; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .track { background: var(--green-500); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.card-hover { transition: transform .2s, box-shadow .2s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.card-header h3 { margin: 0; }
.card-title { font-weight: 700; color: var(--ink); font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--green-800) 0%, var(--green-700) 55%, var(--green-600) 100%);
  color: #fff; padding: 96px 0 110px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.10) 0, transparent 40%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,.08) 0, transparent 45%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 3rem; margin-bottom: 18px; letter-spacing: -.5px; }
.hero .lead { font-size: 1.2rem; color: rgba(255,255,255,.9); max-width: 620px; margin-bottom: 32px; }
.hero .hex {
  width: 120px; height: 120px; margin-bottom: 28px;
  background: rgba(255,255,255,.14);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  display: grid; place-items: center; font-size: 3rem;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-dark { background: rgba(0,0,0,.25); }
.hero .btn-dark:hover { background: rgba(0,0,0,.4); }
.hero-stats { display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: #fff; }
.hero-stat .label { font-size: .85rem; color: rgba(255,255,255,.78); }

/* ---------- 特性栅格 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { text-align: left; }
.feature-icon {
  width: 54px; height: 54px; border-radius: 14px; margin-bottom: 16px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--green-100); color: var(--green-700);
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); margin: 0; font-size: .92rem; }

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::after { content: ""; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: var(--green-100); opacity: .6; }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--green-500); color: #fff; font-size: 1.2rem; margin-bottom: 14px; position: relative; z-index: 1; }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 800; color: var(--ink); line-height: 1.1; position: relative; z-index: 1; }
.stat-card .stat-label { font-size: .85rem; color: var(--muted); margin-top: 4px; position: relative; z-index: 1; }
.stat-card .stat-trend { font-size: .78rem; color: var(--green-600); margin-top: 6px; position: relative; z-index: 1; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data-table th { background: var(--bg-soft); text-align: left; padding: 12px 14px; font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--line); white-space: nowrap; }
table.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
table.data-table tbody tr:hover { background: var(--green-050); }
table.data-table tbody tr:last-child td { border-bottom: 0; }
.mono { font-family: var(--mono); font-size: .82rem; }

/* ---------- 徽标 ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; line-height: 1.5; }
.badge-green { background: var(--green-100); color: var(--green-700); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-gray { background: #eef0ee; color: var(--muted); }
.badge-vip { background: linear-gradient(90deg,#f6d365,#fda085); color: #6b3a0e; }

/* ---------- 提示框 ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.alert-success { background: var(--green-100); color: var(--green-800); border: 1px solid var(--green-400); }
.alert-danger { background: var(--danger-bg); color: #a32020; border: 1px solid #f3b4b4; }
.alert-info { background: var(--info-bg); color: #1a5fa0; border: 1px solid #b3d4f3; }
.alert-warn { background: var(--warn-bg); color: #8a5413; border: 1px solid #f3d8a8; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; top: 80px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 260px; max-width: 360px; padding: 13px 16px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-md); border-left: 4px solid var(--green-500); font-size: .9rem; animation: toastIn .25s ease; }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast.info { border-left-color: var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ---------- 模态框 ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,40,28,.5); backdrop-filter: blur(3px); z-index: 1000; display: grid; place-items: center; padding: 24px; animation: fade .2s; }
.modal { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; animation: modalIn .25s ease; }
.modal.modal-lg { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.modal-close { background: none; border: 0; font-size: 1.4rem; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- 后台布局 ---------- */
.app-shell { display: flex; min-height: calc(100vh - var(--header-h)); }
.sidebar {
  width: 240px; flex: none; background: var(--green-900); color: rgba(255,255,255,.8);
  padding: 20px 0; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.sidebar .side-title { padding: 0 24px; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.4); margin: 18px 0 8px; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 11px 24px; color: rgba(255,255,255,.8); font-size: .92rem; transition: all .15s; border-left: 3px solid transparent; }
.sidebar a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar a.active { background: rgba(104,160,99,.18); color: #fff; border-left-color: var(--green-500); }
.sidebar a .ico { width: 20px; text-align: center; }
.app-main { flex: 1; padding: 28px 32px; min-width: 0; background: var(--bg-soft); }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
.page-head .sub { color: var(--muted); font-size: .9rem; }
.tab-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 24px; }
.tab-bar button { background: none; border: 0; padding: 12px 20px; font-family: inherit; font-size: .95rem; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.tab-bar button:hover { color: var(--green-700); }
.tab-bar button.active { color: var(--green-700); border-bottom-color: var(--green-500); }

/* ---------- 用户菜单 ---------- */
.user-chip { display: flex; align-items: center; gap: 8px; color: #fff; padding: 6px 12px; border-radius: 20px; background: rgba(255,255,255,.12); cursor: pointer; font-size: .9rem; }
.user-chip .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--green-500); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }

/* ---------- 登录页 ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 40px 20px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card { padding: 36px 32px; }
.auth-tabs { display: flex; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 26px; }
.auth-tabs button { flex: 1; background: none; border: 0; padding: 10px; border-radius: var(--radius-sm); font-family: inherit; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .2s; }
.auth-tabs button.active { background: #fff; color: var(--green-700); box-shadow: var(--shadow); }

/* ---------- 空状态 / 加载 ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ico { font-size: 2.4rem; margin-bottom: 12px; opacity: .5; }
.spinner { width: 38px; height: 38px; border: 3px solid var(--green-100); border-top-color: var(--green-500); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.6); z-index: 2000; display: grid; place-items: center; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager button { min-width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); cursor: pointer; font-size: .85rem; color: var(--text); }
.pager button:hover:not(:disabled) { border-color: var(--green-500); color: var(--green-700); }
.pager button.active { background: var(--green-500); color: #fff; border-color: var(--green-500); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 商城/精品卡片 ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.shop-item { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.shop-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.shop-item .thumb { height: 130px; background: linear-gradient(135deg, var(--green-100), var(--green-050)); display: grid; place-items: center; font-size: 2.4rem; color: var(--green-500); }
.shop-item .body { padding: 14px; }
.shop-item .body h4 { margin: 0 0 6px; font-size: 1rem; }
.shop-item .price { color: var(--danger); font-weight: 800; font-size: 1.1rem; }
.shop-item .price .unit { font-size: .75rem; color: var(--muted); font-weight: 400; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.7); padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: .9rem; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; text-align: center; font-size: .82rem; color: rgba(255,255,255,.5); }
.friend-links { display: flex; flex-wrap: wrap; gap: 10px; }
.friend-links a { padding: 4px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; font-size: .82rem; }

/* ---------- 代码块 ---------- */
.code-block { background: var(--green-900); color: #d6e8d6; padding: 18px 20px; border-radius: var(--radius-sm); font-family: var(--mono); font-size: .85rem; overflow-x: auto; line-height: 1.7; }
.code-block .k { color: #8cc178; } .code-block .s { color: #f0c674; } .code-block .c { color: #6b8a6b; font-style: italic; }

/* ---------- 工具类补充 ---------- */
.divider { height: 1px; background: var(--line); margin: 24px 0; border: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.nowrap { white-space: nowrap; }
.scroll-x { overflow-x: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; top: 0; display: flex; flex-wrap: wrap; padding: 10px; gap: 4px; }
  .sidebar .side-title { display: none; }
  .sidebar a { border-left: 0; border-bottom: 3px solid transparent; padding: 8px 14px; }
  .sidebar a.active { border-bottom-color: var(--green-500); border-left-color: transparent; }
  .app-main { padding: 20px 16px; }
}
@media (max-width: 720px) {
  h1 { font-size: 2rem; }
  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-stats { gap: 28px; }
  .feature-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; background: var(--green-800); padding: 12px; gap: 2px; }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 48px 0; }
}

/* ============================================================
   认证页 UI 增强 (登录 / 注册 / 找回密码)
   ============================================================ */
.auth-wrap { background: linear-gradient(160deg, #eef4ec 0%, #f6f9f5 45%, #e9f1e7 100%); }
.auth-card .card {
  padding: 0;
  border: 1px solid rgba(104,160,99,.18);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(56,84,60,.16), 0 2px 8px rgba(0,0,0,.04);
  overflow: hidden;
}
.auth-head {
  text-align: center;
  padding: 32px 32px 24px;
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff;
}
.auth-logo {
  width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 16px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.38);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 800; letter-spacing: 2px;
}
.auth-head h1 { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: 1px; }
.auth-head p { margin: 6px 0 0; font-size: .82rem; opacity: .9; }
.auth-card .card .auth-tabs,
.auth-card .card form { padding-left: 32px; padding-right: 32px; }
.auth-card .card form { padding-bottom: 32px; padding-top: 2px; }
.auth-tabs { margin: 24px 0 22px; }

/* 字段提示 / 校验态 */
.field-msg { font-size: .78rem; color: var(--muted); margin: 6px 2px 0; min-height: 1em; transition: color .2s; }
.field-msg.error { color: var(--danger); }
.form-control.valid { border-color: var(--green-500); }
.form-control.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,53,69,.12); }

/* 密码可见切换 */
.pwd-wrap { position: relative; }
.pwd-wrap .form-control { padding-right: 44px; }
.pwd-toggle {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; cursor: pointer; color: var(--muted);
  border-radius: 8px; transition: color .2s, background .2s;
}
.pwd-toggle:hover { color: var(--green-700); background: var(--green-100); }
.pwd-toggle svg {
  width: 20px; height: 20px;
  position: absolute;
  transition: opacity .15s ease;
}
/* 默认(密码隐藏): 显示睁眼图标, 隐藏闭眼图标 */
.pwd-toggle .eye-open  { opacity: 1; }
.pwd-toggle .eye-closed { opacity: 0; }
/* 密码可见时: 隐藏睁眼图标, 显示闭眼图标 */
.pwd-wrap.show .eye-open   { opacity: 0; }
.pwd-wrap.show .eye-closed { opacity: 1; }

/* 密码强度 */
.pwd-strength { display: flex; align-items: center; gap: 6px; margin-top: 8px; opacity: 0; transition: opacity .2s; }
.pwd-strength.show { opacity: 1; }
.pwd-strength span { flex: 1; height: 5px; border-radius: 3px; background: #e3e8e3; transition: background .25s; }
.pwd-strength .pwd-strength-text { flex: none; font-size: .74rem; color: var(--muted); min-width: 36px; text-align: right; }
.pwd-strength.lv0 span.on, .pwd-strength.lv1 span.on { background: #e36b6b; }
.pwd-strength.lv2 span.on { background: #e0a93b; }
.pwd-strength.lv3 span.on { background: var(--green-500); }

/* 倒计时 / 禁用按钮 */
.btn-outline.counting, .btn-outline:disabled { opacity: .65; cursor: not-allowed; }
.auth-card .btn-primary { margin-top: 4px; }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ico { font-size: 3rem; opacity: .4; margin-bottom: 12px; }
.empty p { font-size: .92rem; }

/* 系统配置项 */
.cfg-list { display: flex; flex-direction: column; }
.cfg-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.cfg-item:last-child { border-bottom: 0; }
.cfg-info { flex: 1; min-width: 0; }
.cfg-label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.cfg-label code { font-weight: 400; margin-left: 6px; }
.cfg-desc { margin-top: 3px; }
.cfg-value { flex: none; min-width: 100px; text-align: right; font-size: .9rem; }

/* 接口文档 */
.doc-intro { padding: 4px 0; }
.doc-intro p { margin: 0 0 8px; font-size: .9rem; line-height: 1.8; }
.doc-intro code, .doc-base-url { background: var(--green-050); padding: 2px 8px; border-radius: 4px; font-size: .85rem; color: var(--green-700); }

.doc-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.doc-item-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--bg-soft); cursor: pointer; transition: background .2s;
  user-select: none;
}
.doc-item-head:hover { background: var(--green-050); }
.doc-method {
  flex: none; padding: 3px 10px; border-radius: 4px; font-size: .72rem; font-weight: 700; color: #fff;
  font-family: var(--mono);
}
.method-post { background: var(--green-600); }
.method-get { background: var(--info); }
.method-put { background: var(--warn); }
.method-delete { background: var(--danger); }
.doc-title { font-weight: 600; font-size: .92rem; color: var(--ink); }
.doc-path { font-size: .82rem; color: var(--muted); flex: 1; }
.doc-copy-btn { flex: none; }

.doc-item-body { display: none; padding: 16px; border-top: 1px solid var(--line); }
.doc-item.expanded .doc-item-body { display: block; }
.doc-item.expanded .doc-item-head { background: var(--green-100); }

.doc-section { margin-bottom: 16px; }
.doc-section:last-child { margin-bottom: 0; }
.doc-section-title { font-weight: 700; font-size: .82rem; color: var(--green-700); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.doc-url-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.doc-url-box code { font-size: .85rem; color: var(--green-700); word-break: break-all; }
.doc-param-table { font-size: .85rem; }
.doc-param-table th, .doc-param-table td { padding: 8px 12px; }
.doc-code-block {
  background: #1e2b1e; color: #d4e8d4; border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: .82rem; font-family: var(--mono);
  overflow-x: auto; line-height: 1.6; margin: 0; white-space: pre-wrap; word-break: break-all;
}
