/* ============================================================
   在线客服系统 · 全局设计系统 V2（企业官网级）
   Remix Icon + CSS 变量 · 商务蓝紫 · 分屏认证布局
   ============================================================ */
:root {
  --primary: #2f54eb;
  --primary-deep: #1d39c4;
  --violet: #6d28d9;
  --grad: linear-gradient(135deg, #2f54eb 0%, #6d28d9 100%);
  --grad-deep: linear-gradient(150deg, #0b1a3a 0%, #14275e 55%, #3b2a86 100%);
  --grad-soft: linear-gradient(135deg, rgba(47,84,235,.08), rgba(109,40,217,.08));
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e6eaf2;
  --line-2: #d8deeb;
  --txt: #101828;
  --txt-2: #51607a;
  --txt-3: #98a2b3;
  --dark: #0b1526;
  --dark-2: #13223f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 12px 32px rgba(16,24,40,.09);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 4px 14px rgba(16,24,40,.06);
  --shadow-lg: 0 24px 64px rgba(11,21,38,.18);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
/* 全局兜底：[hidden] 优先级高于任何类样式的 display */
[hidden] { display: none !important; }
body {
  font-family: var(--font);
  color: var(--txt);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-deep); }
i[class^="ri-"] { vertical-align: -2px; }
.muted { color: var(--txt-3); }
.small { font-size: 12px; }
::selection { background: rgba(47,84,235,.18); }

/* ---------- 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 600; letter-spacing: .2px;
  padding: 11px 22px; border-radius: var(--radius-sm);
  transition: all .2s cubic-bezier(.4,0,.2,1); user-select: none; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(47,84,235,.32), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.14), transparent 45%);
  pointer-events: none;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(47,84,235,.42); filter: brightness(1.05); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-ghost { background: #fff; color: var(--txt-2); border: 1px solid var(--line-2); font-weight: 500; }
.btn-ghost:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); background: rgba(47,84,235,.03); }
.btn-danger { background: #fef2f2; color: #dc2626; font-weight: 500; }
.btn-danger:hover:not(:disabled) { background: #fee2e2; }
.btn-sm { padding: 6px 13px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 12px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: none; border-radius: 9px;
  background: transparent; color: var(--txt-2); cursor: pointer; font-size: 18px;
  transition: all .15s;
}
.icon-btn:hover { background: var(--grad-soft); color: var(--primary); }

/* ---------- 表单 ---------- */
.form { display: grid; gap: 16px; }
.form-title {
  font-size: 12px; color: var(--txt-3); font-weight: 700;
  margin: 8px 0 -2px; letter-spacing: 1.2px; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.form-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { display: grid; gap: 7px; }
.field > span { font-size: 13px; color: var(--txt-2); font-weight: 600; }
.field > span i { color: var(--primary); margin-right: 2px; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 14px; color: var(--txt);
  border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 11px 13px; outline: none; background: #fff; width: 100%;
  transition: border-color .18s, box-shadow .18s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--txt-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47,84,235,.10);
}
.field input:disabled, .field textarea:disabled { background: #f6f7fa; color: var(--txt-3); }

/* ---------- 提示条 ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 14px; line-height: 1.55;
  border: 1px solid transparent;
}
.alert i { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.alert-ok   { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.alert-err  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(11,21,38,.94); color: #fff; font-size: 13px; font-weight: 500;
  padding: 11px 20px; border-radius: 100px; z-index: 999;
  box-shadow: 0 10px 30px rgba(11,21,38,.35);
  animation: toastIn .25s cubic-bezier(.4,0,.2,1); max-width: 86vw; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============================================================
   分屏认证布局（企业官网级）
   ============================================================ */
.auth-body {
  min-height: 100vh; display: flex; align-items: stretch; justify-content: center;
  background: var(--dark);
  padding: 0;
}
.auth-shell {
  display: flex; width: 100%; min-height: 100vh;
}
/* 左侧品牌区 */
.auth-brand-pane {
  flex: 1 1 46%; max-width: 620px; position: relative; overflow: hidden;
  background: var(--grad-deep); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 56px;
}
.auth-brand-pane::before {
  content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(93,124,255,.28), transparent 62%);
  top: -180px; right: -160px; pointer-events: none;
}
.auth-brand-pane::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(147,82,246,.20), transparent 62%);
  bottom: -160px; left: -140px; pointer-events: none;
}
.auth-brand-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand-mark {
  width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  border: 1px solid rgba(255,255,255,.16);
}
.auth-brand-top span { font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.auth-brand-mid { position: relative; z-index: 1; }
.auth-brand-mid h2 { font-size: 30px; line-height: 1.35; font-weight: 800; letter-spacing: 1px; margin-bottom: 14px; }
.auth-brand-mid h2 em { font-style: normal; background: linear-gradient(90deg, #8fb0ff, #c9a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand-mid p { color: rgba(255,255,255,.72); font-size: 14.5px; line-height: 1.9; max-width: 400px; }
.auth-feats { display: grid; gap: 18px; margin-top: 34px; position: relative; z-index: 1; }
.auth-feat { display: flex; gap: 13px; align-items: flex-start; }
.auth-feat i {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center; font-size: 19px; color: #a9c0ff;
}
.auth-feat b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.auth-feat small { color: rgba(255,255,255,.60); font-size: 12.5px; line-height: 1.7; }
.auth-brand-foot { color: rgba(255,255,255,.4); font-size: 12px; position: relative; z-index: 1; }

/* 右侧表单区 */
.auth-form-pane {
  flex: 1 1 54%; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px; position: relative;
}
.auth-form-pane::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,84,235,.07), transparent 65%);
  top: -120px; left: -120px; pointer-events: none;
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--card);
  border-radius: 20px; padding: 40px 36px 30px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.8);
  position: relative; z-index: 1;
}
.auth-card .auth-brand { display: none; }
.auth-title { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.auth-sub { color: var(--txt-2); font-size: 13.5px; margin: 6px 0 24px; }
.auth-foot { text-align: center; color: var(--txt-3); font-size: 13px; margin-top: 22px; }
.auth-foot a { font-weight: 600; margin: 0 4px; }
.auth-agreement { font-size: 12px; color: var(--txt-3); text-align: center; margin-top: 14px; }

/* 简易居中卡片模式（安装页等窄屏兼容） */
.auth-body.solo { padding: 24px 16px; align-items: center; }
.auth-body.solo .auth-shell { display: block; min-height: 0; width: 100%; max-width: 480px; margin: 0 auto; }
.auth-body.solo .auth-brand-pane { display: none; }
.auth-body.solo .auth-form-pane { padding: 0; }
.install-card { max-width: 480px; }
.install-links { display: grid; gap: 10px; }

/* 卡密页 */
.plan-brief {
  background: var(--grad-soft); border: 1px solid rgba(47,84,235,.16);
  padding: 13px 15px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--txt-2); margin-bottom: 18px; line-height: 1.75;
}
.plan-brief b { color: var(--primary); }
.card-list-mini { display: grid; gap: 6px; margin-top: 10px; }
.mini-row {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; padding: 9px 11px; background: #f8f9fe; border-radius: 8px;
}
.mini-row .code { font-family: Consolas, monospace; color: var(--primary); font-weight: 600; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cdd4e2; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b3bdd2; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .auth-shell { flex-direction: column; }
  .auth-brand-pane {
    max-width: none; flex: none; padding: 26px 24px 30px;
  }
  .auth-brand-mid h2 { font-size: 21px; }
  .auth-feats { display: none; }
  .auth-brand-foot { display: none; }
  .auth-form-pane { padding: 26px 16px 40px; }
  .auth-card { padding: 28px 22px 22px; box-shadow: var(--shadow); }
}
