/* ============================================================
   AMZ996 跨境导航 — 设计系统
   现代简约 · 玻璃质感 · 流畅动效
   ============================================================ */

:root {
  /* 品牌色:亚马逊橙 × 深海军蓝 */
  --brand: #ff6a2b;
  --brand-deep: #f04e0b;
  --brand-soft: #fff1ea;
  --ink: #0f1b2d;
  --ink-2: #33415c;
  --ink-3: #64748b;
  --ink-4: #94a3b8;
  --line: #e6eaf2;
  --bg: #f6f7fb;
  --card: #ffffff;
  --navy: #101b33;
  --navy-2: #16233f;
  --accent: #4f7cff;
  --green: #16a34a;
  --red: #ef4444;
  --amber: #f59e0b;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .05), 0 2px 8px rgba(15, 27, 45, .04);
  --shadow-md: 0 4px 16px rgba(15, 27, 45, .08), 0 1px 4px rgba(15, 27, 45, .05);
  --shadow-lg: 0 12px 40px rgba(15, 27, 45, .14);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(255, 106, 43, .2); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::-webkit-scrollbar-track { background: transparent; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(230, 234, 242, .8);
}
.topbar-inner {
  display: flex; align-items: center; gap: 24px;
  height: 62px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 19px; letter-spacing: .3px;
  color: var(--ink); white-space: nowrap;
}
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 4px 12px rgba(255, 106, 43, .35);
  color: #fff;
}
.logo small { font-size: 11px; font-weight: 500; color: var(--ink-3); display: block; line-height: 1.1; }

.top-nav { display: flex; gap: 4px; margin-left: 8px; }
.top-nav a {
  padding: 7px 14px; border-radius: 10px; font-size: 14.5px;
  color: var(--ink-2); font-weight: 500;
  transition: all .25s var(--ease);
}
.top-nav a:hover { color: var(--brand-deep); background: var(--brand-soft); }
.top-nav a.active { color: var(--brand-deep); background: var(--brand-soft); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  transition: all .25s var(--ease);
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; box-shadow: 0 4px 14px rgba(255, 106, 43, .3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 106, 43, .42); }
.btn-ghost { border-color: var(--line); color: var(--ink-2); background: #fff; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: #fee2e2; color: var(--red); }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: #dcfce7; color: var(--green); }
.btn-success:hover { background: #bbf7d0; }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; border-radius: 99px;
  border: 1px solid var(--line); background: #fff;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: all .25s var(--ease); position: relative;
}
.user-chip:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c5cff);
  color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}
.user-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  min-width: 160px; padding: 6px; z-index: 200;
  animation: pop .2s var(--ease);
}
.user-menu a, .user-menu button {
  display: flex; width: 100%; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px;
  color: var(--ink-2); transition: background .2s;
}
.user-menu a:hover, .user-menu button:hover { background: var(--bg); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------------- 公告条 ---------------- */
.notice-bar {
  background: linear-gradient(90deg, var(--navy), var(--navy-2));
  color: #cdd8ee; font-size: 13px;
  overflow: hidden; white-space: nowrap;
}
.notice-inner { display: flex; align-items: center; gap: 10px; height: 38px; }
.notice-tag {
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px; flex-shrink: 0;
}
.notice-scroll { flex: 1; overflow: hidden; position: relative; }
.notice-text { display: inline-block; animation: marquee 30s linear infinite; padding-right: 60px; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ---------------- Hero 搜索区 ---------------- */
.hero {
  background:
    radial-gradient(1200px 400px at 20% -10%, rgba(255, 106, 43, .14), transparent 60%),
    radial-gradient(900px 380px at 85% 0%, rgba(79, 124, 255, .12), transparent 55%),
    linear-gradient(180deg, #fff, var(--bg));
  padding: 52px 0 34px;
}
.hero-title {
  text-align: center; font-size: clamp(26px, 4vw, 40px);
  font-weight: 800; letter-spacing: 1px; color: var(--ink);
}
.hero-title .hl {
  background: linear-gradient(135deg, var(--brand), #ff9a3d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-slogan { text-align: center; color: var(--ink-3); margin-top: 10px; font-size: 15px; }

.search-box {
  max-width: 680px; margin: 28px auto 0;
  display: flex; align-items: center;
  background: #fff; border-radius: 16px;
  border: 2px solid transparent;
  box-shadow: var(--shadow-md);
  transition: all .3s var(--ease);
  overflow: hidden;
}
.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 8px 30px rgba(255, 106, 43, .18);
  transform: translateY(-1px);
}
.search-engine {
  border: none; outline: none; background: var(--bg);
  height: 54px; padding: 0 14px; font-size: 14px;
  color: var(--ink-2); border-right: 1px solid var(--line);
  flex-shrink: 0;
}
.search-input {
  flex: 1; border: none; outline: none; height: 54px;
  padding: 0 18px; font-size: 15.5px; color: var(--ink);
  background: transparent; min-width: 0;
}
.search-btn {
  height: 54px; padding: 0 28px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; font-size: 15px; font-weight: 700;
  transition: filter .25s; flex-shrink: 0;
}
.search-btn:hover { filter: brightness(1.08); }

.hot-words {
  max-width: 680px; margin: 12px auto 0;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 13px; color: var(--ink-4);
}
.hot-words a {
  padding: 3px 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 99px; color: var(--ink-2);
  transition: all .25s var(--ease);
}
.hot-words a:hover { border-color: var(--brand); color: var(--brand-deep); transform: translateY(-1px); }

/* 搜索建议下拉 */
.suggest-panel {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  max-height: 420px; overflow-y: auto; z-index: 150;
  animation: pop .2s var(--ease); padding: 8px;
}
.suggest-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  transition: background .2s;
}
.suggest-item:hover { background: var(--brand-soft); }
.suggest-item .si-logo { font-size: 20px; width: 32px; height: 32px; display: grid; place-items: center; background: var(--bg); border-radius: 8px; }
.suggest-item .si-name { font-weight: 600; font-size: 14px; }
.suggest-item .si-cat { font-size: 12px; color: var(--ink-4); margin-left: auto; }
.search-wrap { position: relative; max-width: 680px; margin: 28px auto 0; }
.search-wrap .search-box { margin: 0; }

/* ---------------- 快捷条(世界时钟/汇率) ---------------- */
.quickbar {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-top: 26px;
}
.quick-chip {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 16px;
  font-size: 13px; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.quick-chip b { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.quick-chip .qc-icon { font-size: 16px; }
.qc-code { font-size: 11px !important; font-weight: 800; color: var(--brand-deep); background: var(--brand-soft); padding: 2px 7px; border-radius: 6px; letter-spacing: .5px; }

/* ---------------- 主体布局 ---------------- */
.layout {
  display: grid; grid-template-columns: 200px 1fr 250px;
  gap: 24px; padding: 28px 0 60px; align-items: start;
}

/* 左侧分类导航 */
.side-cats {
  position: sticky; top: 84px;
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--line); padding: 10px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.side-cat {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px; border-radius: 11px;
  font-size: 14px; color: var(--ink-2); font-weight: 500;
  transition: all .22s var(--ease); text-align: left;
}
.side-cat .sc-icon { font-size: 16px; width: 22px; text-align: center; }
.side-cat .sc-count { margin-left: auto; font-size: 11px; color: var(--ink-4); background: var(--bg); padding: 1px 8px; border-radius: 99px; }
.side-cat:hover { background: var(--brand-soft); color: var(--brand-deep); }
.side-cat.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; box-shadow: 0 4px 12px rgba(255, 106, 43, .3);
}
.side-cat.active .sc-count { background: rgba(255,255,255,.22); color: #fff; }

/* 链接分区 */
.link-section { margin-bottom: 30px; scroll-margin-top: 80px; }
.section-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.section-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 17px;
  background: var(--navy); color: #fff;
}
.section-title { font-size: 18px; font-weight: 700; }
.section-desc { font-size: 13px; color: var(--ink-4); }

.link-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
}
.link-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  transition: all .28s var(--ease);
  position: relative; overflow: hidden;
}
.link-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,106,43,.06), transparent 55%);
  opacity: 0; transition: opacity .28s;
}
.link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 106, 43, .4);
  box-shadow: var(--shadow-md);
}
.link-card:hover::before { opacity: 1; }
.lc-logo {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  background: var(--bg); display: grid; place-items: center;
  font-size: 22px; overflow: hidden;
  border: 1px solid var(--line);
}
.lc-logo img { width: 100%; height: 100%; object-fit: cover; }
.lc-body { min-width: 0; flex: 1; }
.lc-name {
  font-weight: 650; font-size: 14.5px; color: var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.lc-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; flex-shrink: 0; line-height: 1.6; }
.badge-hot { background: #fee2e2; color: var(--red); }
.badge-rec { background: #e0ecff; color: var(--accent); }
.lc-desc {
  font-size: 12.5px; color: var(--ink-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lc-meta { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
.lc-tag { font-size: 11px; color: var(--ink-4); background: var(--bg); padding: 1px 7px; border-radius: 5px; }
.lc-clicks { font-size: 11px; color: var(--ink-4); margin-left: auto; }

/* 右侧栏 */
.sidebar-right { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.widget {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 18px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: 14.5px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.widget-title::before {
  content: ''; width: 4px; height: 16px; border-radius: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand-deep));
}
.rank-list { display: flex; flex-direction: column; gap: 2px; }
.rank-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px; border-radius: 10px; font-size: 13.5px;
  transition: background .2s;
}
.rank-item:hover { background: var(--brand-soft); }
.rank-num {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; color: var(--ink-4);
  background: var(--bg);
}
.rank-item:nth-child(1) .rank-num { background: #fee2e2; color: var(--red); }
.rank-item:nth-child(2) .rank-num { background: #ffedd5; color: var(--amber); }
.rank-item:nth-child(3) .rank-num { background: #fef9c3; color: #ca8a04; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; color: var(--ink-2); }
.rank-count { font-size: 11.5px; color: var(--ink-4); }

.ad-card {
  border-radius: var(--radius-lg); padding: 18px;
  color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
  display: block;
}
.ad-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.ad-card .ad-tag {
  font-size: 10px; background: rgba(255,255,255,.18);
  padding: 2px 8px; border-radius: 5px; letter-spacing: 1px;
}
.ad-card h4 { margin-top: 8px; font-size: 16px; }
.ad-card p { font-size: 12.5px; opacity: .8; margin-top: 4px; }

.submit-card { text-align: center; }
.submit-card .sc-big { font-size: 30px; }
.submit-card h4 { margin: 6px 0 4px; }
.submit-card p { font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }

/* ---------------- 工具页 ---------------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tool-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: all .28s var(--ease);
}
.tool-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tool-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.tool-icon { font-size: 24px; width: 46px; height: 46px; display: grid; place-items: center; background: var(--brand-soft); border-radius: 13px; }
.tool-name { font-size: 16px; font-weight: 700; }
.tool-desc { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; min-height: 40px; }
.tool-row { display: flex; gap: 8px; }
.tool-input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-size: 14px; outline: none;
  transition: border-color .25s; min-width: 0;
}
.tool-input:focus { border-color: var(--brand); }
.tool-output {
  margin-top: 12px; background: var(--navy); color: #a5f3c8;
  border-radius: 10px; padding: 14px 16px;
  font-family: "SF Mono", Consolas, monospace; font-size: 13px;
  white-space: pre-wrap; word-break: break-all;
  max-height: 260px; overflow-y: auto;
  animation: pop .25s var(--ease);
}
.tool-output.err { color: #fca5a5; }

/* ---------------- 文章页 ---------------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.post-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px;
  transition: all .28s var(--ease); display: block;
  box-shadow: var(--shadow-sm);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(255,106,43,.35); }
.post-cat { font-size: 11.5px; color: var(--brand-deep); background: var(--brand-soft); padding: 2px 10px; border-radius: 99px; font-weight: 600; }
.post-title { font-size: 16.5px; font-weight: 700; margin-top: 10px; line-height: 1.45; }
.post-summary { font-size: 13.5px; color: var(--ink-3); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--ink-4); }

.post-detail { max-width: 780px; margin: 0 auto; background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 44px 52px; box-shadow: var(--shadow-sm); }
.post-detail h1 { font-size: 27px; line-height: 1.4; }
.post-detail-meta { display: flex; gap: 16px; color: var(--ink-4); font-size: 13px; margin: 14px 0 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.md-body { font-size: 15.5px; line-height: 1.85; color: var(--ink-2); }
.md-body h1, .md-body h2, .md-body h3 { color: var(--ink); margin: 26px 0 12px; line-height: 1.4; }
.md-body h1 { font-size: 22px; } .md-body h2 { font-size: 19px; } .md-body h3 { font-size: 16.5px; }
.md-body p { margin: 12px 0; }
.md-body ul, .md-body ol { padding-left: 24px; margin: 12px 0; }
.md-body li { margin: 6px 0; }
.md-body code { background: var(--bg); padding: 2px 7px; border-radius: 6px; font-size: 13.5px; color: var(--brand-deep); }
.md-body pre { background: var(--navy); color: #d5e1f5; padding: 16px; border-radius: 12px; overflow-x: auto; margin: 14px 0; }
.md-body pre code { background: none; color: inherit; padding: 0; }
.md-body blockquote { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 12px 18px; border-radius: 0 10px 10px 0; margin: 14px 0; color: var(--ink-2); }
.md-body table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.md-body th, .md-body td { border: 1px solid var(--line); padding: 9px 13px; text-align: left; }
.md-body th { background: var(--bg); font-weight: 700; }
.md-body a { color: var(--accent); text-decoration: underline; }
.md-body img { border-radius: 12px; margin: 14px 0; }

/* ---------------- 页脚 ---------------- */
.footer { background: var(--navy); color: #8fa0bd; margin-top: 40px; }
.footer-inner { padding: 44px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer h5 { color: #fff; font-size: 14.5px; margin-bottom: 14px; }
.footer a { display: block; font-size: 13.5px; padding: 5px 0; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 18px; }
.footer-desc { font-size: 13px; margin-top: 12px; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0; font-size: 12.5px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15, 27, 45, .5);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  animation: fadeIn .2s;
  padding: 20px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 440px; padding: 30px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .3s var(--ease);
  max-height: 88vh; overflow-y: auto;
}
.modal-lg { max-width: 640px; }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.modal-sub { font-size: 13.5px; color: var(--ink-3); margin-bottom: 20px; }
.modal-close { position: absolute; top: 18px; right: 18px; font-size: 20px; color: var(--ink-4); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; transition: all .2s; }
.modal-close:hover { background: var(--bg); color: var(--ink); }
.modal { position: relative; }

.form-item { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-size: 14px; outline: none;
  transition: border-color .25s; background: #fff; color: var(--ink);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--brand); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-error { color: var(--red); font-size: 13px; margin-top: 4px; }
.form-hint { color: var(--ink-4); font-size: 12px; margin-top: 4px; }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--ink); color: #fff;
  padding: 11px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideUp .3s var(--ease);
  max-width: 90vw;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

/* ---------------- 页面标题 ---------------- */
.page-head { padding: 34px 0 20px; }
.page-title { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.page-sub { color: var(--ink-3); font-size: 14px; margin-top: 6px; }

/* ---------------- 空状态 ---------------- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-4); }
.empty .empty-icon { font-size: 44px; margin-bottom: 10px; }

/* ---------------- 管理后台 ---------------- */
.admin-layout { display: grid; grid-template-columns: 215px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--navy); color: #8fa0bd;
  padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; padding: 0 10px 20px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 16px; white-space: nowrap; }
.admin-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: 11px;
  font-size: 14px; font-weight: 500;
  transition: all .22s; margin-bottom: 2px; width: 100%; text-align: left;
  color: #8fa0bd;
}
.admin-nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav-item.active { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; box-shadow: 0 4px 12px rgba(255,106,43,.35); }
.admin-nav-item .badge-count { margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; padding: 0 5px; }
.admin-main { padding: 30px 34px; background: var(--bg); min-width: 0; }
.admin-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.admin-sub { color: var(--ink-3); font-size: 13.5px; margin-bottom: 24px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 18px; box-shadow: var(--shadow-sm); }
.stat-num { font-size: 26px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 15.5px; font-weight: 700; }
.panel-body { padding: 20px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 12px 14px; background: var(--bg); color: var(--ink-3); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #fafbfd; }
.table .cell-main { font-weight: 600; color: var(--ink); }
.table .cell-sub { font-size: 12px; color: var(--ink-4); }

.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.status-on::before { background: var(--green); }
.status-off::before { background: var(--ink-4); }
.status-pending { color: var(--amber); } .status-pending::before { background: var(--amber); }
.status-published { color: var(--green); } .status-published::before { background: var(--green); }
.status-draft { color: var(--ink-4); } .status-draft::before { background: var(--ink-4); }
.status-rejected { color: var(--red); } .status-rejected::before { background: var(--red); }
.status-approved { color: var(--green); } .status-approved::before { background: var(--green); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .form-input, .toolbar .form-select { width: auto; padding: 8px 12px; font-size: 13.5px; }

.pager { display: flex; gap: 8px; justify-content: center; padding: 16px; align-items: center; font-size: 13.5px; color: var(--ink-3); }
.pager button { padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: all .2s; }
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-deep); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* 登录页 */
.auth-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1000px 500px at 30% 10%, rgba(255,106,43,.12), transparent 60%), radial-gradient(800px 400px at 80% 90%, rgba(79,124,255,.1), transparent 55%), var(--bg); padding: 20px; }
.auth-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); width: 100%; max-width: 400px; padding: 38px 34px; animation: slideUp .35s var(--ease); }
.auth-tabs { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.auth-tab { flex: 1; padding: 9px; text-align: center; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-3); transition: all .25s; }
.auth-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* 骨架屏 */
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f8fafc 50%, #eef1f6 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 淡入 */
.fade-in { animation: fadeUp .45s var(--ease) both; }
.fade-in-d1 { animation-delay: .05s; } .fade-in-d2 { animation-delay: .1s; } .fade-in-d3 { animation-delay: .15s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 返回顶部 */
.back-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 44px; height: 44px; border-radius: 13px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-md); font-size: 18px;
  display: grid; place-items: center;
  transition: all .3s var(--ease);
  opacity: 0; pointer-events: none; transform: translateY(10px);
}
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 190px 1fr; }
  .sidebar-right { display: none; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side-cats { position: static; display: flex; overflow-x: auto; max-height: none; padding: 8px; }
  .side-cat { white-space: nowrap; }
  .side-cat .sc-count { display: none; }
  .top-nav { display: none; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; display: flex; overflow-x: auto; padding: 10px; }
  .admin-logo { display: none; }
  .admin-nav-item { white-space: nowrap; }
  .admin-main { padding: 20px 16px; }
  .post-detail { padding: 26px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .container { padding: 0 16px; }
}
