/* 起司通行证 · 主题（参照起司云控制台：米色底 + 金色主色 + 白色圆角卡片） */
:root {
  --bg: #f6f2e9;
  --bg-deep: #efe9db;
  --card: #ffffff;
  --border: #ece5d3;
  --text: #3d3524;
  --muted: #8a8069;
  --gold: #b8860b;
  --gold-deep: #9a7209;
  --gold-light: #d4a72c;
  --gold-bg: #f5edda;
  --green: #3f9142;
  --green-bg: #e7f2e6;
  --red: #c4453c;
  --red-bg: #f9e8e6;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(90, 75, 30, .06), 0 8px 24px rgba(90, 75, 30, .05);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-deep); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
h1, h2, h3 { font-weight: 600; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px;
  padding: 0 28px; height: 58px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--text); }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #d4a72c, #9a7209); color: #fff; font-size: 16px;
}
.topbar .spacer { flex: 1; }
.topbar .links a { margin-right: 20px; color: var(--muted); font-weight: 500; }
.topbar .links a:hover, .topbar .links a.on { color: var(--text); }
.avatar-mini {
  width: 32px; height: 32px; border-radius: 50%; background: var(--gold-bg); color: var(--gold-deep);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; cursor: pointer;
}
.avatar-mini img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 按钮 / 表单 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; cursor: pointer;
  border-radius: 999px; padding: 9px 22px; font-size: 14px; font-weight: 600; transition: .15s;
  background: #f1ebdc; color: var(--text);
}
.btn:hover { filter: brightness(.97); }
.btn-gold { background: linear-gradient(135deg, #d4a72c, #b8860b); color: #fff; box-shadow: 0 4px 12px rgba(184,134,11,.28); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input, select.input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: #fbf9f3; font-size: 14px; color: var(--text); outline: none; transition: .15s;
}
.input:focus { border-color: var(--gold-light); background: #fff; box-shadow: 0 0 0 3px rgba(212,167,44,.15); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ===== 认证页 ===== */
.pg-auth {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(800px 400px at 15% 0%, rgba(212,167,44,.10), transparent),
    radial-gradient(700px 400px at 90% 100%, rgba(184,134,11,.08), transparent), var(--bg);
  padding: 24px;
}
.auth-card {
  width: 400px; max-width: 100%; background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow); padding: 36px 34px;
}
.auth-logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; margin-bottom: 22px; justify-content: center; }
.auth-logo .logo { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #d4a72c, #9a7209); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.auth-card h2 { text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.oauth-row { display: flex; gap: 12px; justify-content: center; }
.oauth-btn {
  flex: 1; padding: 10px 0; border-radius: 12px; border: 1px solid var(--border); background: #fbf9f3;
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); transition: .15s;
}
.oauth-btn:hover { border-color: var(--gold-light); background: #fff; }
.oauth-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== 首页 ===== */
.hero { text-align: center; padding: 90px 24px 60px; }
.hero h1 { font-size: 40px; letter-spacing: 1px; }
.hero h1 .g { background: linear-gradient(135deg, #d4a72c, #9a7209); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 16px; margin: 14px 0 30px; }
.hero .btn { margin: 0 8px; padding: 12px 32px; font-size: 15px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; max-width: 1060px; margin: 20px auto 80px; padding: 0 24px; }
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow); transition: .2s;
}
.feature:hover { transform: translateY(-3px); }
.feature .ico { font-size: 26px; margin-bottom: 10px; }
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--muted); }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 0 40px; }

/* ===== 控制台布局（账号页 / 管理后台） ===== */
.console { display: flex; min-height: calc(100vh - 58px); }
.sidebar { width: 210px; padding: 20px 14px; flex-shrink: 0; }
.side-group { font-size: 12px; color: var(--muted); padding: 12px 12px 6px; }
.side-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  cursor: pointer; color: var(--text); font-weight: 500; margin-bottom: 2px; border: 1px solid transparent;
}
.side-item:hover { background: rgba(255,255,255,.7); }
.side-item.on { background: var(--card); border-color: var(--border); box-shadow: var(--shadow); color: var(--gold-deep); font-weight: 700; }
.main { flex: 1; padding: 24px 28px 60px; min-width: 0; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px;
}
.card h3 { font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } .sidebar { width: 64px; } .side-item span.t { display: none; } .main { padding: 20px 14px; } }

/* ===== 表格 ===== */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid #f3efe4; vertical-align: middle; }
.table tr:hover td { background: #fbf8f0; }
.table .ops { white-space: nowrap; text-align: right; }

/* ===== 徽标 ===== */
.chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.chip.gold { background: var(--gold-bg); color: var(--gold-deep); }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.red { background: var(--red-bg); color: var(--red); }
.chip.gray { background: #f0ece1; color: var(--muted); }

/* ===== 弹窗 / 提示 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(50,40,15,.35); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 18px; padding: 26px 28px; width: 480px; max-width: 100%; max-height: 86vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal h3 { margin-bottom: 16px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
#toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: #3d3524; color: #fff; padding: 10px 22px; border-radius: 999px; font-size: 13px;
  opacity: 0; transition: .25s; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
#toast.show { opacity: 1; }
#toast.err { background: var(--red); }

/* 工具 */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb16 { margin-bottom: 16px; }
.pagination { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; font-size: 13px; color: var(--muted); }
.stat-num { font-size: 26px; font-weight: 800; }
.stat-card { text-align: center; padding: 18px 8px; }
code.k { background: var(--gold-bg); color: var(--gold-deep); padding: 1px 7px; border-radius: 6px; font-size: 12px; }
