/* =============================================================
 * 卡速售 · 独立授权站 —— 后台样式
 * ============================================================= */
* { box-sizing: border-box; }

:root {
  --bg:     #f4f6fb;
  --panel:  #ffffff;
  --line:   #e6ebf5;
  --txt:    #25324d;
  --muted:  #8b95a9;
  --brand:  #2f6bff;
  --green:  #12a150;
  --red:    #e5484d;
  --orange: #f5a524;
  --gray:   #8b95a9;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font: 14px/1.7 -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }

.side {
  width: 214px; flex: none; background: #101a33; color: #c7d0e0;
  display: flex; flex-direction: column; padding: 18px 0;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 0 18px 18px; }
.logo {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  background: linear-gradient(135deg, #3f7cff, #8b5cf6);
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.brand strong { display: block; color: #fff; font-size: 15px; }
.brand span { font-size: 11px; color: #7f8ba3; letter-spacing: .06em; }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.nav a { display: block; padding: 9px 12px; border-radius: 8px; color: #c7d0e0; text-decoration: none; }
.nav a:hover { background: #1b2848; color: #fff; }
.nav a.on { background: var(--brand); color: #fff; }

.sidefoot { margin-top: auto; padding: 14px 18px 0; }
.logoutform { margin: 0; }
.logout {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font: inherit; font-size: 13px; color: #8f9ab2; text-decoration: none;
}
.logout:hover { color: #fff; }
.ver { color: #5c6784; font-size: 12px; margin-top: 6px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 26px; background: #fff; border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 18px; margin: 0; }
.who { color: var(--muted); font-size: 13px; }
.content { padding: 22px 26px 64px; width: 100%; max-width: 1200px; }

/* ---------- 面板 / 卡片 ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; margin-bottom: 18px; box-shadow: 0 6px 22px rgba(24, 44, 90, .04);
}
.panel h2 { font-size: 15px; margin: 0 0 14px; }
.panel h3 { font-size: 14px; margin: 20px 0 10px; }
.panel > :last-child { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 6px 22px rgba(24, 44, 90, .04);
}
.cnum { font-size: 26px; font-weight: 700; line-height: 1.2; }
.clabel { color: var(--muted); font-size: 13px; margin-top: 2px; }
.c-green { color: var(--green); }
.c-orange { color: var(--orange); }
.c-red { color: var(--red); }
.c-gray { color: var(--gray); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 980px) {
  .grid2 { grid-template-columns: 1fr; }
  .layout { flex-direction: column; }
  .side { width: 100%; flex-direction: row; align-items: center; padding: 10px 12px; }
  .brand { padding: 0 12px 0 0; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidefoot { margin: 0 0 0 auto; padding: 0; }
}

/* ---------- 表格 ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; color: var(--muted); font-weight: 600; background: #f7f9fe;
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid #f1f4fa; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fbfcff; }
.tbl.kv td:first-child { width: 200px; color: var(--muted); }
.ta-r { text-align: right; }
.nowrap { white-space: nowrap; }

.mono { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12.5px; word-break: break-all; }
.muted { color: var(--muted); }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 20px;
  font-size: 12px; line-height: 1.9; white-space: nowrap;
}
.b-green  { background: #e7f7ee; color: #0d8a45; }
.b-orange { background: #fff4e2; color: #b26a00; }
.b-red    { background: #fdecec; color: #c62a2f; }
.b-gray   { background: #eef1f6; color: #6b7688; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 7px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--txt); text-decoration: none; cursor: pointer;
  font-size: 13px; line-height: 1.5; font-family: inherit;
}
.btn:hover { border-color: #c9d6ef; background: #f8faff; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #245ae0; border-color: #245ae0; color: #fff; }
.btn-danger { background: #fff; border-color: #f3c9cb; color: var(--red); }
.btn-danger:hover { background: #fdecec; }
.btn-xs { padding: 3px 9px; font-size: 12px; border-radius: 7px; }
.btn-block { display: block; width: 100%; text-align: center; padding: 10px 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 0; }
.inline { display: inline-block; margin: 0; }

/* ---------- 分页（2026-09-13） ---------- */
.pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.pager-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pager .btn.is-off { opacity: .45; cursor: not-allowed; }
.pager .btn.btn-primary { pointer-events: none; }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .form .row { grid-template-columns: 1fr; } }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
label .req { color: var(--red); }
input[type="text"], input[type="password"], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; font-size: 13.5px; color: var(--txt); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
textarea.code {
  width: 100%; font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12.5px;
  background: #f8fafd; color: #33415e; line-height: 1.7; resize: vertical;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters input[type="text"] { width: 240px; }
.filters select { width: auto; min-width: 130px; }

/* ---------- 提示条 ---------- */
.flash { border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 13.5px; }
.flash-ok  { background: #e9f8ef; border: 1px solid #c4ecd5; color: #0d7a40; }
.flash-err { background: #fdeeee; border: 1px solid #f6cbcc; color: #b32227; }

/* ---------- 登录 / 安装页（2026-09-14 改为浅色版） ----------
 * 上一版是深蓝紫大渐变，颜色太重。本版改为「浅底 + 柔和光斑」：
 *   · 背景换成极浅的蓝紫渐变，右上/左下各一枚低透明度光斑，只提供空间感；
 *   · 卡片保持白底，边框与投影都收轻，避免“压在深色上”的沉重感；
 *   · 品牌渐变（顶部装饰条 / logo / 主按钮）保留，但阴影收敛、更轻盈。
 * 安装向导（install.php）复用同一套类名，一并享受浅色版。 */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 16px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #f4f7ff 0%, #f8faff 42%, #f5f3ff 100%);
}
.login-body::before, .login-body::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); z-index: 0; pointer-events: none;
}
.login-body::before { width: 480px; height: 480px; background: rgba(96, 140, 255, .20); top: -170px; left: -130px; }
.login-body::after  { width: 540px; height: 540px; background: rgba(168, 132, 255, .18); bottom: -210px; right: -160px; }

.install-wrap { width: 100%; max-width: 720px; position: relative; z-index: 1; }
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px; margin: 0 auto;
  background: #fff; border: 1px solid #e8edf7; border-radius: 20px;
  padding: 40px 34px 30px;
  box-shadow: 0 18px 44px -14px rgba(40, 64, 124, .16), 0 2px 6px rgba(40, 64, 124, .04);
  overflow: hidden;
}
.login-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #4f8bff, #8b5cf6);
}
.login-card.wide { max-width: 720px; padding: 28px 30px; }
.login-card.center { text-align: center; }
.login-logo {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 18px;
  background: linear-gradient(135deg, #4f8bff, #8b5cf6); color: #fff; font-weight: 800; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 22px -6px rgba(79, 139, 255, .45);
}
.login-card h1 { font-size: 21px; margin: 0 0 6px; text-align: center; color: #1c2540; letter-spacing: .3px; }
.login-sub { color: #808b9f; font-size: 13px; text-align: center; margin: 0 0 26px; }
.login-card .form { text-align: left; }
.login-card > label { margin-bottom: 15px; font-weight: 600; color: #5b6577; font-size: 13px; }
.login-card input[type="text"], .login-card input[type="password"] {
  margin-top: 7px; width: 100%; padding: 12px 14px; border: 1px solid #e2e8f4; border-radius: 12px;
  font-size: 14px; background: #fafcff; color: #1f2a44; font-family: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-card input[type="text"]:focus, .login-card input[type="password"]:focus {
  outline: none; border-color: #4f8bff; background: #fff; box-shadow: 0 0 0 4px rgba(79, 139, 255, .14);
}
.login-card input::placeholder { color: #b3bdcd; }
.login-card .btn-primary.btn-block {
  margin-top: 6px; padding: 13px; font-size: 15px; font-weight: 600; letter-spacing: 4px;
  border: none; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, #4f8bff, #6b7cf6);
  box-shadow: 0 10px 22px -8px rgba(79, 139, 255, .55);
  transition: filter .15s, box-shadow .15s, transform .06s;
}
.login-card .btn-primary.btn-block:hover {
  filter: brightness(1.05); box-shadow: 0 14px 26px -8px rgba(79, 139, 255, .62);
}
.login-card .btn-primary.btn-block:active { transform: translateY(1px); }
.login-foot { color: #9aa3b5; font-size: 12px; text-align: center; margin: 18px 0 0; }
@media (max-width: 520px) {
  .login-card { padding: 32px 22px 24px; border-radius: 16px; }
  .login-card h1 { font-size: 19px; }
}

.steps { display: flex; flex-direction: column; gap: 8px; margin: 18px 0; text-align: left; }
.step { display: flex; gap: 10px; align-items: center; background: #f8fafd; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
.step b { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }

.danger-title { color: var(--red); }
