/* ============================================================
   SCIOP · 星链互联开放平台 — 全站样式
   蓝白正式风格 · 单文件设计体系
   ============================================================ */

:root {
  --sc-primary: #2563eb;
  --sc-primary-dark: #0b3ba7;
  --sc-primary-deep: #071f56;
  --sc-ink: #0f1e3d;
  --sc-text: #2c3a54;
  --sc-muted: #7b879c;
  --sc-bg: #f4f7fe;
  --sc-border: #e4eaf6;
  --sc-card: #ffffff;
  --sc-radius: 14px;
  --sc-shadow: 0 6px 28px rgba(15, 40, 105, .08);
  --sc-shadow-lg: 0 18px 50px rgba(11, 59, 167, .16);
  --el-color-primary: #2563eb;
  --el-color-primary-dark-2: #0b3ba7;
  --el-color-primary-light-3: #557ff0;
  --el-color-primary-light-5: #8aa8f5;
  --el-color-primary-light-7: #bccdf9;
  --el-color-primary-light-8: #d5e0fb;
  --el-color-primary-light-9: #eaf1fe;
  --el-border-radius-base: 8px;
  --el-font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--el-font-family);
  background: var(--sc-bg);
  color: var(--sc-text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sc-primary); text-decoration: none; }
a:hover { color: var(--sc-primary-dark); }
::selection { background: #bcd0fb; }

.boot-splash {
  display: flex; flex-direction: column; gap: 14px; align-items: center;
  justify-content: center; height: 100vh; color: var(--sc-muted);
}
.boot-mark { font-size: 42px; color: var(--sc-primary); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .4; transform: scale(.92); } }

/* ---------- 通用布局 ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.page-wrap { min-height: calc(100vh - 64px); padding: 34px 0 60px; }
.card {
  background: var(--sc-card); border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius); box-shadow: var(--sc-shadow);
}
.card-pad { padding: 26px 28px; }
.section-title { font-size: 19px; font-weight: 700; color: var(--sc-ink); margin: 0 0 4px; }
.section-sub { color: var(--sc-muted); font-size: 13.5px; margin: 0 0 20px; }
.muted { color: var(--sc-muted); }
.mono { font-family: "JetBrains Mono", Consolas, monospace; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 64px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sc-border); position: sticky; top: 0; z-index: 50;
}
.topbar-inner { display: flex; align-items: center; gap: 34px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--sc-ink); font-size: 17px; letter-spacing: .5px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; color: #fff; font-size: 17px;
  background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark));
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
}
.brand small { font-weight: 500; color: var(--sc-muted); font-size: 12px; letter-spacing: 0; }
.navlinks { display: flex; gap: 6px; flex: 1; }
.navlinks a {
  padding: 7px 15px; border-radius: 8px; color: var(--sc-text); font-size: 14.5px; transition: .15s;
}
.navlinks a:hover { background: #eef3fe; color: var(--sc-primary); }
.navlinks a.active { background: #e7eefc; color: var(--sc-primary); font-weight: 600; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(59,130,246,.45), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(29,78,216,.5), transparent 55%),
    linear-gradient(150deg, #071f56 0%, #0b3ba7 55%, #1d4ed8 100%);
  padding: 92px 0 108px;
}
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars i {
  position: absolute; background: #fff; border-radius: 50%; opacity: .8;
  animation: twinkle 3s infinite ease-in-out;
}
@keyframes twinkle { 50% { opacity: .15; transform: scale(.6); } }
.constellation {
  position: absolute; inset: 0; pointer-events: none; opacity: .35;
}
.hero-inner { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; text-align: center; padding: 0 28px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  font-size: 13px; letter-spacing: 2px; margin-bottom: 26px; color: #dbe7ff;
}
.hero-title { font-size: 56px; font-weight: 800; letter-spacing: 4px; margin: 0; line-height: 1.15; }
.hero-title .grad {
  background: linear-gradient(100deg, #ffffff 20%, #9cc0ff 80%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-en { font-size: 16px; letter-spacing: 5px; color: #a9c4f7; text-transform: uppercase; margin: 14px 0 6px; }
.hero-cn { font-size: 21px; font-weight: 600; color: #eaf1ff; letter-spacing: 8px; margin: 0 0 18px; }
.hero-desc { color: #c3d5f8; max-width: 640px; margin: 0 auto 36px; font-size: 15.5px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }
.hero-stats {
  position: relative; z-index: 2; display: flex; gap: 60px; justify-content: center;
  margin-top: 64px; flex-wrap: wrap;
}
.hero-stat b { display: block; font-size: 26px; color: #fff; }
.hero-stat span { color: #9db9ee; font-size: 13px; letter-spacing: 1px; }

/* 首页功能区 */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 52px; }
.feature {
  padding: 28px 24px; border-radius: var(--sc-radius); background: #fff;
  border: 1px solid var(--sc-border); box-shadow: var(--sc-shadow);
  transition: .25s; position: relative; overflow: hidden;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--sc-shadow-lg); }
.feature .icon {
  width: 46px; height: 46px; border-radius: 12px; font-size: 22px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: #eaf1fe; color: var(--sc-primary);
}
.feature h3 { margin: 0 0 8px; font-size: 16.5px; color: var(--sc-ink); }
.feature p { margin: 0; color: var(--sc-muted); font-size: 13.5px; line-height: 1.7; }

/* API 展示块 */
.api-block { margin-top: 52px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 26px; align-items: stretch; }
.code-window {
  background: #0d1b3e; border-radius: var(--sc-radius); padding: 20px 24px;
  color: #c8d7f8; font-family: "JetBrains Mono", Consolas, monospace; font-size: 13px;
  line-height: 1.9; overflow: auto; box-shadow: var(--sc-shadow-lg);
}
.code-window .dots { display: flex; gap: 6px; margin-bottom: 14px; }
.code-window .dots i { width: 10px; height: 10px; border-radius: 50%; background: #2c4a8f; }
.code-window .dots i:first-child { background: #f66; } .code-window .dots i:nth-child(2) { background: #fc6; } .code-window .dots i:last-child { background: #6c6; }
.code-window .k { color: #7ea6ff; } .code-window .s { color: #8fe3b0; } .code-window .c { color: #5c6f9e; }

/* ---------- 页脚 ---------- */
.footer { background: #0d1b3e; color: #8fa5cf; padding: 34px 0; font-size: 13.5px; }
.footer a { color: #b9ccf3; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

/* ---------- 认证页（登录/注册） ---------- */
.auth-shell { min-height: 100vh; display: flex; }
.auth-side {
  flex: 1.1; position: relative; overflow: hidden; color: #fff; padding: 60px 64px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(900px 460px at 80% -10%, rgba(96,165,250,.4), transparent 60%),
    linear-gradient(160deg, #071f56 0%, #0b3ba7 60%, #1d4ed8 100%);
}
.auth-side .brand-row { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 800; letter-spacing: 1px; }
.auth-side .brand-row .mark {
  width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3); display: inline-flex; align-items: center; justify-content: center; font-size: 19px;
}
.auth-side-main { position: relative; z-index: 2; }
.auth-side-main h2 { font-size: 34px; margin: 0 0 14px; letter-spacing: 2px; line-height: 1.3; }
.auth-side-main p { color: #c3d5f8; max-width: 420px; font-size: 15px; }
.auth-side-ticks { margin-top: 34px; display: grid; gap: 13px; }
.auth-side-ticks div { display: flex; gap: 10px; align-items: center; color: #dbe7ff; font-size: 14px; }
.auth-side-ticks i {
  width: 20px; height: 20px; border-radius: 50%; background: rgba(120,170,255,.25);
  color: #cfe0ff; font-style: normal; font-size: 12px; display: inline-flex; align-items: center; justify-content: center;
}
.auth-side-foot { color: #8fa5cf; font-size: 12.5px; position: relative; z-index: 2; letter-spacing: 1px; }
.auth-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(700px 340px at 100% 0%, #e8efff, transparent 60%),
    radial-gradient(600px 300px at 0% 100%, #eef3ff, transparent 55%),
    var(--sc-bg);
  padding: 48px 24px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card .panel { padding: 40px 42px 36px; border-radius: 18px; }
.auth-card h1 { font-size: 24px; color: var(--sc-ink); margin: 0 0 6px; font-weight: 800; letter-spacing: 1px; }
.auth-card .sub { color: var(--sc-muted); font-size: 13.5px; margin: 0 0 26px; }
.auth-card .el-form-item { margin-bottom: 18px; }
.auth-card .el-input__wrapper, .auth-card .el-input__wrapper.is-focus { box-shadow: 0 0 0 1px var(--sc-border) inset; border-radius: 10px; padding: 4px 14px; }
.auth-card .el-input__inner { height: 40px; }
.auth-card .el-input__wrapper.is-focus { box-shadow: 0 0 0 2px var(--sc-primary) inset !important; }
.auth-card .submit-btn { width: 100%; height: 46px; font-size: 15.5px; font-weight: 600; border-radius: 10px; letter-spacing: 6px; }
.auth-alt { text-align: center; margin-top: 22px; color: var(--sc-muted); font-size: 13.5px; }
.auth-brand-head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 26px; }
.auth-brand-head .big-mark {
  width: 54px; height: 54px; border-radius: 14px; color: #fff; font-size: 26px;
  background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .35);
}
.auth-brand-head b { font-size: 21px; letter-spacing: 3px; color: var(--sc-ink); }
.auth-brand-head span { font-size: 11px; letter-spacing: 1.6px; color: var(--sc-muted); text-transform: uppercase; }
.auth-bg-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .14; }
.login-bg-custom { position: absolute; inset: 0; background-size: cover; background-position: center; }
.login-bg-veil { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(7,31,86,.88), rgba(11,59,167,.82)); }
.oauth-divider { display: flex; align-items: center; gap: 14px; color: var(--sc-muted); font-size: 12.5px; margin: 22px 0 14px; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 1px; background: var(--sc-border); }
.oauth-btns { display: flex; gap: 12px; }
.oauth-btns .el-button { flex: 1; }

/* ---------- 应用页框架 ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.banner-verify {
  background: linear-gradient(90deg, #fef3c7, #fde68a); color: #92400e;
  padding: 9px 28px; font-size: 13.5px; display: flex; gap: 12px; align-items: center; justify-content: center;
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* 查询结果卡 */
.user-card { display: flex; gap: 20px; padding: 24px; align-items: flex-start; }
.avatar-xl {
  width: 76px; height: 76px; border-radius: 16px; background: #e7eefc; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: var(--sc-primary); font-size: 30px; font-weight: 700;
  overflow: hidden;
}
.avatar-xl img { width: 100%; height: 100%; object-fit: cover; }
.field-rows { display: grid; gap: 9px; font-size: 14px; }
.field-rows .row { display: flex; gap: 14px; }
.field-rows .k { width: 76px; color: var(--sc-muted); flex-shrink: 0; }
.field-rows .v { color: var(--sc-ink); word-break: break-all; }
.expired-tag { color: #b45309; font-size: 12.5px; background: #fef3c7; border-radius: 6px; padding: 2px 8px; }

/* 开关表格 */
.vis-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 4px; border-bottom: 1px dashed var(--sc-border); }
.vis-row:last-child { border-bottom: 0; }
.vis-row .desc { color: var(--sc-muted); font-size: 12.5px; }

/* token 显示块 */
.token-reveal {
  background: #0d1b3e; color: #8fe3b0; border-radius: 10px; padding: 14px 18px;
  font-family: "JetBrains Mono", Consolas, monospace; font-size: 13.5px; word-break: break-all;
  margin: 12px 0;
}

/* ---------- 管理后台 ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
  width: 216px; background: linear-gradient(180deg, #071f56, #0b3ba7); color: #cfe0ff;
  padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; flex-shrink: 0;
}
.admin-side .brand { color: #fff; padding: 0 10px 20px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 14px; }
.admin-side .brand .mark { background: rgba(255,255,255,.16); box-shadow: none; border: 1px solid rgba(255,255,255,.25); }
.admin-nav { display: grid; gap: 3px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 9px;
  color: #b9ccf3; font-size: 14px; transition: .15s;
}
.admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav a.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.admin-nav .group { color: #7e97c9; font-size: 11.5px; letter-spacing: 2px; padding: 14px 14px 4px; }
.admin-main { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card { padding: 20px 22px; border-radius: var(--sc-radius); background: #fff; border: 1px solid var(--sc-border); box-shadow: var(--sc-shadow); }
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--sc-ink); line-height: 1.2; }
.stat-card .label { color: var(--sc-muted); font-size: 13px; }
.stat-card.warn .num { color: #b45309; }

/* 错误详情面板 */
.error-panel { border: 1px solid #f3c1c1; background: #fff5f5; border-radius: 10px; padding: 14px 18px; margin-top: 12px; }
.error-panel .stack {
  background: #1a1023; color: #ff9e9e; font-family: Consolas, monospace; font-size: 12px;
  padding: 12px 14px; border-radius: 8px; overflow: auto; max-height: 240px; white-space: pre-wrap; margin: 8px 0 0;
}
.error-panel .meta { color: #8c4a4a; font-size: 12.5px; display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }

/* 验证指引 */
.verify-steps { display: grid; gap: 12px; }
.verify-steps .step { display: flex; gap: 12px; }
.verify-steps .no {
  width: 24px; height: 24px; border-radius: 50%; background: var(--sc-primary); color: #fff;
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 600;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .api-block { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: static; }
  .admin-nav { grid-template-columns: repeat(3, 1fr); }
  .admin-nav .group { display: none; }
  .hero-title { font-size: 40px; }
  .hero-stats { gap: 30px; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr; }
  .admin-nav { grid-template-columns: repeat(2, 1fr); }
}

/* Element Plus 微调 */
.el-card { border-radius: var(--sc-radius); }
.el-table { --el-table-border-color: var(--sc-border); }
.el-table th.el-table__cell { background: #f7f9fe !important; color: var(--sc-ink); font-weight: 600; }
.el-dialog { border-radius: 16px; }
.el-message-box { border-radius: 14px; }
.page-pagination { display: flex; justify-content: flex-end; margin-top: 18px; }
.toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.el-descriptions__label { color: var(--sc-muted) !important; }
