/* ==========================================================================
   云枢 CDN · 客户端 / 落地页浅色主题 (portal.css)
   仅由 portal.html 与 index.html 引入，加载顺序在 app.css 之后：
   - 覆写 :root 设计令牌，把 app.css 的深色控制台变成浅色简洁大气风格；
   - 覆写 app.css 中硬编码深色的组件（侧栏/顶栏/卡片/按钮/表单/表格/弹窗/Toast 等）；
   - 补充客户端与落地页专属组件；零外链、零构建、响应式 ≥1200 / <1100 / <760。
   ========================================================================== */

/* ==========================================================================
   1. 浅色设计令牌
   ========================================================================== */
:root {
  --bg: #f5f7fc;
  --bg-soft: #eef2fa;
  --bg-grid: rgba(79, 70, 229, 0.05);
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --panel-2: #f8fafd;
  --panel-hover: #f3f6fe;
  --border: #e6ebf5;
  --border-strong: #cfd9ee;
  --text: #1e293b;
  --text-2: #3f4c63;
  --muted: #6b7a93;
  --muted-2: #94a3b8;
  --primary: #4f46e5;
  --primary-2: #2563eb;
  --primary-soft: rgba(79, 70, 229, 0.08);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.09);
  --warn: #b45309;
  --warn-soft: rgba(245, 158, 11, 0.11);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.07);
  --info: #2563eb;
  --info-soft: rgba(37, 99, 235, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 56px rgba(30, 41, 59, 0.14);
  --shadow-sm: 0 1px 2px rgba(30, 41, 59, 0.04), 0 8px 24px rgba(30, 41, 59, 0.055);
  --sidebar-w: 244px;
  --topbar-h: 66px;
  --focus: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

/* ==========================================================================
   2. 基础
   ========================================================================== */
body {
  color: var(--text);
  background: var(--bg);
}

body::before {
  background:
    radial-gradient(1000px 540px at 6% -12%, rgba(79, 70, 229, 0.075), transparent 62%),
    radial-gradient(900px 520px at 96% -4%, rgba(37, 99, 235, 0.065), transparent 62%),
    radial-gradient(760px 460px at 52% 112%, rgba(124, 58, 237, 0.05), transparent 64%),
    var(--bg);
}

::selection { background: rgba(79, 70, 229, 0.18); color: #1e1b4b; }

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.28);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.45);
  background-clip: padding-box;
}

a { color: var(--primary); }

.logo-mark {
  background: linear-gradient(140deg, #6366f1, #2563eb);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   3. 布局：侧栏 / 顶栏 / 用户菜单 / 代登录横幅 / 页脚
   ========================================================================== */
.sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-right: 1px solid var(--border);
}

.sidebar-brand .brand { color: inherit; }
.sidebar-brand .brand:hover { text-decoration: none; }
.sidebar-brand .brand-name,
.sidebar-brand .brand-sub { display: block; line-height: 1.3; }
.sidebar-brand .brand-name { color: var(--text); }
.brand-sub { color: var(--muted-2); }

.nav-group-title { color: var(--muted-2); }
.nav-item { color: var(--text-2); }
.nav-item:hover { background: rgba(79, 70, 229, 0.06); color: var(--primary); }
.nav-item.active {
  color: var(--primary);
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.12), rgba(37, 99, 235, 0.05));
  border-color: rgba(79, 70, 229, 0.22);
  box-shadow: inset 2px 0 0 var(--primary);
}
.nav-item.active svg { color: var(--primary); opacity: 1; }
.nav-item .nav-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 17px;
}
.nav-item .nav-ico svg { width: 17px; height: 17px; }
.nav-item .nav-badge {
  background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(79, 70, 229, 0.22);
}

.sidebar-foot { border-top: 1px solid var(--border); }
.sidebar-foot .ver { color: var(--muted-2); }

.sidebar-plan {
  margin: 10px 4px 0; padding: 12px 13px; border-radius: 12px;
  border: 1px solid var(--border); background: linear-gradient(160deg, #f7f9ff, #fdfdff);
  cursor: pointer; transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.sidebar-plan:hover { border-color: #c7d2fe; box-shadow: var(--shadow-sm); }
.sp-label { font-size: 10.5px; letter-spacing: 0.9px; color: var(--muted-2); text-transform: uppercase; }
.sp-name { font-size: 13.5px; font-weight: 700; color: var(--text); margin-top: 3px; }
.sp-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sp-progress { margin-top: 9px; height: 5px; }

.topbar {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { color: var(--text); }
.topbar-info { min-width: 0; }
.topbar-sub { color: var(--muted); }

.user-chip {
  background: #ffffff;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.user-chip:hover { border-color: var(--border-strong); background: #f8faff; box-shadow: var(--shadow-sm); }
.user-chip .user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip .u-role { color: var(--muted); }
.avatar {
  background: linear-gradient(140deg, #6366f1, #2563eb);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.24);
}
.user-menu { position: relative; }
.user-menu .u-chev { display: inline-flex; color: var(--muted-2); transition: transform 0.18s ease; }
.user-menu .u-chev svg { width: 14px; height: 14px; }
.user-menu.open .u-chev { transform: rotate(180deg); }
.user-menu .dropdown-menu { top: calc(100% + 10px); }
.menu-toggle svg { width: 18px; height: 18px; }
.topbar .menu-toggle { display: none; }

/* ---------- 管理员代登录横幅 ---------- */
.imp-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  background: linear-gradient(95deg, #fff8e7 0%, #ffedc6 55%, #fff8e7 100%);
  border-bottom: 1px solid #eeb44a;
  color: #7c4a03;
  box-shadow: 0 2px 12px rgba(180, 120, 9, 0.13);
}
.imp-inner {
  max-width: 1560px; margin: 0 auto;
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  padding: 9px 22px; font-size: 13px;
}
.imp-ico {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fde68a; border: 1px solid #f2c14e; color: #b45309;
}
.imp-ico svg { width: 15px; height: 15px; }
.imp-text { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.5; min-width: 0; }
.imp-title { font-weight: 800; color: #92400e; letter-spacing: 0.3px; }
.imp-sep { color: #b45309; opacity: 0.6; }
.imp-customer { color: #92400e; font-weight: 800; }
.imp-exit {
  margin-left: auto;
  background: #ffffff; border: 1px solid #e8b04b; color: #92400e; font-weight: 700;
  box-shadow: 0 1px 2px rgba(146, 64, 14, 0.08);
}
.imp-exit:hover { background: #fffaf0; border-color: #d97706; color: #78350f; }
body.has-imp .shell { padding-top: var(--imp-h, 52px); }
body.has-imp .sidebar { top: var(--imp-h, 52px); height: calc(100vh - var(--imp-h, 52px)); }
body.has-imp .topbar { top: var(--imp-h, 52px); }

.portal-page { min-height: 58vh; }
.portal-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 16px 26px; border-top: 1px solid var(--border);
  color: var(--muted-2); font-size: 11.5px;
}
.page-title { color: var(--text); }
.page-desc { color: var(--muted); }

/* ==========================================================================
   4. 卡片 / 统计
   ========================================================================== */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
}
.card-head { border-bottom: 1px solid var(--border); }
.card-title { color: var(--text); }
.card-title svg { color: var(--primary); }
.card-sub { color: var(--muted); }
.card-foot { border-top: 1px solid var(--border); }

.stat-card {
  background: linear-gradient(160deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.stat-card::after {
  background: radial-gradient(circle, rgba(79, 70, 229, 0.1), transparent 68%);
}
.stat-top { color: var(--muted); }
.stat-ico {
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.16);
}
.stat-value { color: var(--text); }
.stat-value small { color: var(--muted); }
.stat-foot { color: var(--muted-2); }
.kpi span { color: var(--muted); }

/* ==========================================================================
   5. 按钮
   ========================================================================== */
.btn {
  background: #ffffff;
  border: 1px solid #e2e8f4;
  color: var(--text-2);
  box-shadow: 0 1px 2px rgba(30, 41, 59, 0.04);
}
.btn:hover {
  background: #f8faff;
  border-color: #c7d4ef;
  color: var(--primary);
}
.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  border-color: transparent; color: #ffffff; font-weight: 700;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.24);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #ffffff; filter: brightness(1.06);
}
.btn-danger { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:hover { background: #f4f7ff; }
.btn.loading::after {
  border: 2px solid rgba(100, 116, 139, 0.28);
  border-top-color: currentColor;
}
.link-btn { color: var(--primary); }
.link-btn:hover { background: var(--primary-soft); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: var(--danger-soft); }

/* ==========================================================================
   6. 表单
   ========================================================================== */
.field label, .field-label { color: var(--text-2); }
.field label .req { color: var(--danger); }
.input, .select, .textarea {
  background-color: #ffffff;
  border: 1px solid #dfe6f2;
  color: var(--text);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(79, 70, 229, 0.55);
  box-shadow: var(--focus);
}
.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7a93' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
.select option { background: #ffffff; color: var(--text); }
.input:disabled, .select:disabled, .textarea:disabled { background: #f8fafc; }
.field-hint { color: var(--muted-2); }
.form-error {
  color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca;
}
.form-ok {
  color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0;
}
.checkbox { color: var(--text-2); }
.checkbox input { accent-color: var(--primary); }

/* 开关 */
.switch .slider { background: #dbe3f0; }
.switch .slider::before { background: #ffffff; box-shadow: 0 1px 3px rgba(30, 41, 59, 0.2); }
.switch input:checked + .slider { background: linear-gradient(135deg, #4f46e5, #2563eb); }
.switch input:checked + .slider::before { background: #ffffff; }

/* ==========================================================================
   7. 表格 / 工具栏 / 空态 / 分页
   ========================================================================== */
.toolbar { border-bottom: 1px solid var(--border); }
.table th {
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: #f7f9fe;
}
.table td { border-bottom: 1px solid #eef2f9; }
.table tbody tr:hover { background: #f8faff; }
.table td.num { white-space: nowrap; }
.table .row-main { color: var(--text); }
.table .row-sub { color: var(--muted-2); }
.table .tbl-actions { justify-content: flex-end; }

.search svg { color: var(--muted-2); }
.pagination { border-top: 1px solid var(--border); color: var(--muted); }

.empty .empty-ico {
  background: #f5f7ff;
  border: 1px dashed #c7d2fe;
  color: var(--primary);
}
.empty { color: var(--muted); }
.empty-title { color: var(--text-2); }
.empty-desc { color: var(--muted); }
.loading-block { color: var(--muted); }
.spinner { border: 2px solid #e2e8f4; border-top-color: var(--primary); }
.skeleton {
  background: linear-gradient(90deg, #eef2fa, #e3e9f6, #eef2fa);
  background-size: 200% 100%;
}

/* ==========================================================================
   8. 徽章 / 标签 / 提示 / 进度 / 步骤
   ========================================================================== */
.badge-success { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.badge-warn { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.badge-danger { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.badge-info { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.badge-muted { color: #64748b; background: #f1f5f9; border-color: #e2e8f0; }

.tag { color: var(--muted); background: #f1f5f9; border: 1px solid #e2e8f0; }
.tag.primary { color: var(--primary); border-color: #c7d2fe; background: var(--primary-soft); }

.alert-info { color: #1e40af; background: #eff6ff; border-color: #bfdbfe; }
.alert-warn { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.alert-danger { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.alert-success { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }

.progress { background: #e9eef8; }
.progress-bar { background: linear-gradient(90deg, #4f46e5, #2563eb); }

.stepper .step:not(:last-child)::after { background: #e8edf6; }
.step .step-dot {
  background: #f1f5f9; border: 1px solid #e2e8f0; color: var(--muted);
}
.step .step-title { color: var(--text-2); }
.step .step-desc { color: var(--muted-2); }
.step.active .step-dot {
  background: var(--primary-soft); border-color: rgba(79, 70, 229, 0.5); color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}
.step.active .step-title { color: var(--primary); }
.step.done .step-dot { background: #ecfdf5; border-color: #6ee7b7; color: var(--success); }
.step.done .step-title { color: var(--success); }
.step.failed .step-dot { background: #fef2f2; border-color: #fca5a5; color: var(--danger); }
.step.failed .step-title { color: var(--danger); }

/* ==========================================================================
   9. 代码块 / 模态框 / Toast / 下拉菜单
   ========================================================================== */
.code-block {
  background: #f6f8ff;
  border: 1px solid #e3e9f7;
  color: #312e81;
}
.copy-btn {
  background: #eef2ff; border: 1px solid #c7d2fe; color: var(--primary);
}
.copy-btn:hover { background: #e0e7ff; }
.copy-line .code-block { flex: 1; }

.modal-mask { background: rgba(15, 23, 42, 0.38); }
.modal {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 90px rgba(30, 41, 59, 0.2);
}
.modal-head, .modal-foot { border-color: var(--border); }
.modal-title { color: var(--text); }
.modal-close { color: var(--muted); }
.modal-close:hover { background: #f1f5f9; color: var(--text); }

.toast-wrap { filter: drop-shadow(0 8px 24px rgba(30, 41, 59, 0.12)); }
.toast {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  color: var(--text);
}
.toast.success { border-color: #a7f3d0; }
.toast.error { border-color: #fecaca; }
.toast.warn { border-color: #fde68a; }
.toast.info { border-color: #bfdbfe; }

.dropdown-menu {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.dropdown-menu button { color: var(--text-2); }
.dropdown-menu button:hover { background: #f4f7ff; color: var(--text); }
.dropdown-menu button.danger { color: var(--danger); }
.dropdown-menu button.danger:hover { background: #fef2f2; color: #b91c1c; }
.dropdown-sep { background: var(--border); }

.drawer-mask { background: rgba(15, 23, 42, 0.32); }
.drawer { background: #ffffff; border-left: 1px solid var(--border-strong); }
.drawer-head { border-bottom: 1px solid var(--border); }

/* ==========================================================================
   10. 客户端专属组件
   ========================================================================== */

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); margin-bottom: 12px;
}
.breadcrumb button {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--primary); font-size: 12.5px; font-family: var(--font); font-weight: 600;
}
.breadcrumb button:hover { text-decoration: underline; }
.breadcrumb svg { width: 13px; height: 13px; color: var(--muted-2); }
.breadcrumb .bc-current { color: var(--muted-2); font-family: var(--mono); word-break: break-all; }

/* ---------- 总览布局 ---------- */
.overview-grid {
  display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: 16px; align-items: start;
}
.overview-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ov-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  margin: 0 0 16px;
}
.ov-warnings { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ov-warnings .alert > div { flex: 1; }

/* ---------- 总览：套餐配额卡 ---------- */
.plan-card { position: relative; overflow: hidden; background: linear-gradient(150deg, #ffffff, #f7f9ff); }
.plan-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #4f46e5, #2563eb 55%, #7c3aed);
}
.plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plan-name { font-size: 20px; font-weight: 750; letter-spacing: 0.3px; color: var(--text); }
.plan-name small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.plan-days { text-align: right; }
.plan-days b { font-family: var(--mono); font-size: 26px; font-weight: 750; color: var(--primary); }
.plan-days span { display: block; font-size: 11.5px; color: var(--muted); }
.plan-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px;
}
.metric {
  padding: 12px 14px; border-radius: 12px; background: #f8faff; border: 1px solid #eef2fa;
}
.metric-label { font-size: 11.5px; color: var(--muted); }
.metric-value {
  font-family: var(--mono); font-size: 20px; font-weight: 750; color: var(--text);
  margin-top: 2px; line-height: 1.2;
}
.metric-value small {
  font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--muted-2); margin-left: 3px;
}
.metric-foot { font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.quota-block { margin-top: 16px; }
.quota-block .progress-meta { margin-bottom: 7px; }
.quota-block .progress-meta span:last-child { font-family: var(--mono); color: var(--text-2); }
.quota-note { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; }
.plan-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border);
  font-size: 12px; color: var(--muted);
}

/* ---------- 总览：CNAME 接入指引 ---------- */
.cname-box {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px;
  border: 1px dashed #c7d2fe; background: #f7f9ff;
}
.cname-val {
  flex: 1 1 180px; font-family: var(--mono); font-size: 13px;
  color: #3730a3; word-break: break-all; line-height: 1.5; font-weight: 600;
}
.cname-box .btn { flex: 0 0 auto; }
.step-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.step-item { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.step-no {
  width: 21px; height: 21px; flex: 0 0 21px; border-radius: 50%; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  background: var(--primary-soft); color: var(--primary); border: 1px solid #c7d2fe;
}
.step-item b { color: var(--text); }

/* ---------- 总览：域名列表 ---------- */
.ov-domain-list { display: flex; flex-direction: column; }
.ov-domain {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 6px; border: none; border-bottom: 1px solid #eef2f9;
  background: none; text-align: left; cursor: pointer; font-family: var(--font);
  transition: background 0.14s ease;
}
.ov-domain:last-child { border-bottom: none; }
.ov-domain:hover { background: #f8faff; border-radius: 10px; }
.ov-domain .d-main { min-width: 0; }
.ov-domain .d-host {
  font-family: var(--mono); font-size: 13.5px; font-weight: 650; color: var(--text);
  word-break: break-all; line-height: 1.4;
}
.ov-domain .d-meta { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.ov-domain .d-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ov-domain .d-arrow { display: inline-flex; color: var(--muted-2); }
.ov-domain .d-arrow svg { width: 15px; height: 15px; }

/* ---------- 提醒列表 ---------- */
.remind-list { display: flex; flex-direction: column; gap: 2px; }
.remind-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 2px;
  border-bottom: 1px solid #eef2f9; font-size: 12.5px; line-height: 1.6;
}
.remind-item:last-child { border-bottom: none; }
.remind-item .r-ico {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.remind-item .r-ico svg { width: 15px; height: 15px; }
.remind-item.warn .r-ico { background: #fffbeb; border: 1px solid #fde68a; color: #b45309; }
.remind-item.danger .r-ico { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.remind-item.info .r-ico { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.remind-item .r-main { min-width: 0; }
.remind-item .r-title { color: var(--text-2); font-weight: 600; word-break: break-all; }
.remind-item .r-desc { color: var(--muted); font-size: 11.5px; margin-top: 1px; }

/* ---------- 快捷操作 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 13px;
  border-radius: 12px; border: 1px solid var(--border); background: #fbfcff;
  cursor: pointer; font-family: var(--font); font-size: 12.8px; font-weight: 600;
  color: var(--text-2); text-align: left; transition: border-color 0.16s ease, background 0.16s ease;
}
.quick-item:hover { border-color: #c7d2fe; background: #f5f8ff; color: var(--primary); }
.quick-item .q-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
}
.quick-item .q-ico svg { width: 16px; height: 16px; }

/* ---------- 我的域名：列表 ---------- */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.domain-remark { color: var(--muted-2); font-size: 11.5px; margin-top: 2px; word-break: break-all; }
.origin-cell { font-family: var(--mono); font-size: 12px; color: var(--text-2); word-break: break-all; }
.origin-cell .oc-sub { display: block; font-family: var(--font); font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.cache-cell { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-2); }
.cache-cell small { font-size: 11px; color: var(--muted-2); }
.cert-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.cert-tag svg { width: 14px; height: 14px; }
.cert-tag.off { color: var(--muted-2); }
.link-cell { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.link-cell svg { width: 13px; height: 13px; color: var(--muted-2); }
.domains-summary { font-size: 12px; color: var(--muted); }

/* ---------- 域名详情 ---------- */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.detail-host {
  font-family: var(--mono); font-size: 20px; font-weight: 750; letter-spacing: 0.2px;
  color: var(--text); word-break: break-all; line-height: 1.3;
}
.detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-grid {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px; align-items: start;
}
.detail-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-host-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.detail-host-row .muted { font-size: 12px; }

.kv-grid { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 9px 14px; font-size: 13px; }
.kv-grid dt { color: var(--muted); }
.kv-grid dd { margin: 0; color: var(--text-2); word-break: break-all; }
.kv-grid dd .mono { color: var(--text); }

.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 12px;
}
.section-title svg { width: 16px; height: 16px; color: var(--primary); }
.section-sub { font-size: 12px; color: var(--muted); margin: -6px 0 12px; line-height: 1.7; }
.section + .section { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--border); }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* 管理员锁定警示 */
.lock-box {
  display: flex; gap: 12px; padding: 15px 16px; border-radius: 14px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border: 1px solid #fdba74; color: #9a3412;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.06);
}
.lock-box .lock-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #ffedd5; border: 1px solid #fdba74; color: #c2410c;
}
.lock-box .lock-ico svg { width: 18px; height: 18px; }
.lock-title { font-size: 14px; font-weight: 750; margin-bottom: 3px; color: #9a3412; }
.lock-desc { font-size: 12.5px; line-height: 1.75; color: #9a3412; }
.lock-desc b { color: #7c2d12; }

.btn.is-locked, .switch.is-locked, .input.is-locked, .select.is-locked {
  opacity: 0.5; cursor: not-allowed !important;
}
.btn.is-locked:hover { background: #ffffff; border-color: #e2e8f4; color: var(--text-2); filter: none; }

/* 证书区 */
.cert-box { display: flex; flex-direction: column; gap: 12px; }
.cert-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cert-head > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--primary); }
.cert-subject {
  font-family: var(--mono); font-size: 13px; font-weight: 650; color: var(--text);
  word-break: break-all; line-height: 1.5;
}
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cert-item { padding: 11px 13px; border-radius: 11px; background: #f8faff; border: 1px solid #eef2fa; }
.cert-item .ci-label { font-size: 11px; color: var(--muted); letter-spacing: 0.3px; }
.cert-item .ci-value {
  font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-top: 3px; word-break: break-all;
}
.san-list { display: flex; flex-wrap: wrap; gap: 6px; }
.san-chip {
  font-family: var(--mono); font-size: 11.5px; padding: 2px 8px; border-radius: 7px;
  background: #f5f7ff; border: 1px solid #e0e7ff; color: #3730a3; word-break: break-all;
}
.cert-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.security-note {
  display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px;
  background: #f5f3ff; border: 1px solid #ddd6fe; color: #5b21b6;
  font-size: 12px; line-height: 1.68;
}
.security-note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; }

/* 验证引导 / 接入状态 */
.verify-option {
  padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: #fbfcff;
}
.verify-option + .verify-option { margin-top: 12px; }
.verify-option-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px;
}
.verify-option-desc { font-size: 11.5px; color: var(--muted-2); margin-bottom: 8px; line-height: 1.6; }
.verify-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.verify-row .vr-label { flex: 0 0 66px; font-size: 11.5px; color: var(--muted); }
.verify-row .vr-value {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; color: #3730a3;
  background: #ffffff; border: 1px solid #e0e7ff; border-radius: 8px;
  padding: 6px 9px; word-break: break-all; line-height: 1.5;
}
.verify-row .btn { flex: 0 0 auto; }
.verify-result { margin-top: 12px; padding: 11px 13px; border-radius: 10px; font-size: 12.5px; line-height: 1.7; }
.verify-result.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.verify-result.fail { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.verify-result .vr-observed {
  margin-top: 5px; font-family: var(--mono); font-size: 11.5px;
  word-break: break-all; color: #78350f; white-space: pre-wrap;
}
.verify-success { text-align: center; padding: 16px 10px 4px; }
.done-ico {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: var(--success);
  box-shadow: 0 0 0 8px rgba(5, 150, 105, 0.06);
}
.done-ico svg { width: 28px; height: 28px; }
.verify-success h3 { font-size: 17px; color: var(--text); margin-bottom: 6px; }
.verify-success p { font-size: 12.5px; color: var(--muted); line-height: 1.75; }

/* ---------- 证书管理 ---------- */
.cert-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cert-card { display: flex; flex-direction: column; gap: 10px; }
.cert-card .cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cert-card .cc-host {
  font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); word-break: break-all;
}
.cert-card .cc-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; word-break: break-all; }
.cert-card .cc-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.cert-empty-card .card-body { padding: 8px; }

/* ---------- 套餐与账户 ---------- */
.plan-hero {
  position: relative; overflow: hidden; padding: 22px; border-radius: 16px;
  border: 1px solid #e0e7ff;
  background:
    radial-gradient(600px 220px at 100% 0%, rgba(79, 70, 229, 0.09), transparent 70%),
    linear-gradient(160deg, #ffffff, #f7f9ff);
}
.plan-hero .ph-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.plan-hero .ph-name { font-size: 22px; font-weight: 750; color: var(--text); letter-spacing: 0.2px; }
.plan-hero .ph-desc { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.7; max-width: 640px; }
.plan-price { font-family: var(--mono); font-size: 24px; font-weight: 750; color: var(--primary); white-space: nowrap; }
.plan-price small { font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.plan-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.feature-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 14px;
  margin-top: 16px; padding: 0; list-style: none;
}
.feature-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.feature-list li svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--success); margin-top: 2px; }
.plan-empty {
  padding: 26px 18px; text-align: center; border-radius: 14px;
  border: 1px dashed #c7d2fe; background: #f8faff; color: var(--muted);
}
.plan-empty h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.plan-empty p { font-size: 12.5px; line-height: 1.8; }
.renew-box {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 12.5px; line-height: 1.7;
}
.renew-box svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
.account-rows { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px 14px; font-size: 13px; margin: 0; }
.account-rows dt { color: var(--muted); }
.account-rows dd { margin: 0; color: var(--text-2); word-break: break-all; }
.password-wrap { max-width: 430px; }
.account-tip { font-size: 11.5px; color: var(--muted-2); line-height: 1.75; margin-top: 10px; }
.imp-note {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 12px; line-height: 1.7;
}
.imp-note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; }

/* ---------- 帮助 ---------- */
.help-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 12px; }
.guide-step { padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: #fbfcff; }
.guide-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px; margin-bottom: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  background: var(--primary-soft); color: var(--primary); border: 1px solid #c7d2fe;
}
.guide-step h4 { font-size: 13.5px; margin-bottom: 6px; color: var(--text); }
.guide-step p { font-size: 12.3px; color: var(--muted); line-height: 1.75; margin: 0; }
.help-section + .help-section { margin-top: 16px; }
.help-text { font-size: 12.8px; line-height: 1.9; color: var(--muted); }
.help-text p + p { margin-top: 8px; }
.help-text b { color: var(--text-2); }
.help-text .mono { color: #3730a3; }
.faq-item { padding: 13px 2px; border-bottom: 1px solid #eef2f9; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 13px; font-weight: 650; color: var(--text); display: flex; gap: 8px; align-items: flex-start; }
.faq-q .mono { color: var(--muted-2); }
.faq-a { font-size: 12.5px; color: var(--muted); line-height: 1.8; margin-top: 6px; padding-left: 26px; }
.contact-box { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 11px;
  border: 1px solid var(--border); background: #fbfcff; font-size: 13px; color: var(--text-2);
}
.contact-item svg { width: 16px; height: 16px; color: var(--primary); }
.contact-item .mono { color: var(--text); }
.help-table td, .help-table th { font-size: 12.5px; }

/* ==========================================================================
   11. 落地页（浅色简洁）
   ========================================================================== */
.landing { background: var(--bg); }
.landing-nav {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.landing-nav .nav-links { color: var(--text-2); }
.landing-nav .nav-links a:hover { color: var(--primary); }
.landing-nav .brand-name { color: var(--text); }

.hero::before {
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
}
.hero h1 { color: #0f172a; }
.hero h1 .grad {
  background: linear-gradient(100deg, #4f46e5 8%, #2563eb 52%, #7c3aed 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); }
.hero-badge {
  color: var(--primary); background: var(--primary-soft);
  border: 1px solid #c7d2fe;
}
.hero-stats {
  background: #ffffff; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.hero-stat b { color: var(--text); }
.hero-stat span { color: var(--muted); }
.landing h2 { color: #0f172a; }
.landing .sec-sub { color: var(--muted); }

.feature-card {
  background: linear-gradient(160deg, #ffffff, #fbfcff);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.feature-card:hover { border-color: #c7d2fe; box-shadow: 0 16px 36px rgba(30, 41, 59, 0.09); }
.feature-card h3 { color: var(--text); }
.feature-card p { color: var(--muted); }
.feature-ico {
  color: var(--primary);
  background: linear-gradient(140deg, rgba(79, 70, 229, 0.12), rgba(37, 99, 235, 0.08));
  border: 1px solid #dbe3ff;
}
.flow-item { background: #ffffff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.flow-item::before {
  color: var(--primary); background: var(--primary-soft); border: 1px solid #c7d2fe;
}
.flow-item h3 { color: var(--text); }
.flow-item p { color: var(--muted); }
.landing-cta {
  border: 1px solid #ddd9fe;
  background:
    radial-gradient(700px 240px at 50% 0%, rgba(79, 70, 229, 0.1), transparent 70%),
    linear-gradient(160deg, #ffffff, #f8f9ff);
  box-shadow: var(--shadow-sm);
}
.landing-cta p { color: var(--muted); }
.landing-footer { border-top: 1px solid var(--border); color: var(--muted-2); }
.landing-footer a { color: var(--muted); }

.os-table { background: #ffffff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.os-table th, .os-table td { border-bottom: 1px solid #eef2f9; color: var(--text-2); }
.os-table th { color: var(--muted); background: #f7f9fe; }
.os-table td b { color: var(--text); }
.recommend-row .recommend-pill {
  background: #ffffff; border: 1px solid var(--border); color: var(--text-2);
}
.recommend-pill.primary {
  color: #047857; border-color: #a7f3d0; background: #ecfdf5;
}
.recommend-pill.muted-pill { color: var(--muted-2); }

.landing-faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.landing-faq .card { height: 100%; }
.landing-faq h3 { font-size: 14.5px; color: var(--text); margin-bottom: 8px; }
.landing-faq p { font-size: 12.8px; color: var(--muted); line-height: 1.8; }

/* 落地页套餐 */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 16px; margin-top: 36px; }
.plan-tile {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 24px 22px; border-radius: 16px;
  background: linear-gradient(160deg, #ffffff, #fbfcff);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.plan-tile:hover { transform: translateY(-3px); border-color: #c7d2fe; box-shadow: 0 18px 40px rgba(30, 41, 59, 0.1); }
.plan-tile.featured { border-color: #c7d2fe; box-shadow: 0 14px 36px rgba(79, 70, 229, 0.12); }
.plan-tile .pt-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px;
  color: var(--primary); background: var(--primary-soft);
  border: 1px solid #c7d2fe; border-radius: 99px; padding: 2px 9px;
}
.plan-tile .pt-name { font-size: 16px; font-weight: 750; color: var(--text); }
.plan-tile .pt-desc { font-size: 12px; color: var(--muted-2); line-height: 1.65; min-height: 20px; }
.pt-price { font-family: var(--mono); font-size: 27px; font-weight: 750; color: var(--text); line-height: 1.1; }
.pt-price small { font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.pt-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-features { display: flex; flex-direction: column; gap: 7px; margin: 6px 0 2px; padding: 0; list-style: none; }
.pt-features li { display: flex; gap: 7px; align-items: flex-start; font-size: 12.3px; color: var(--text-2); line-height: 1.6; }
.pt-features li svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--success); margin-top: 2px; }
.plan-tile .btn { margin-top: auto; }
.plans-fallback { text-align: center; padding: 30px 16px; color: var(--muted); font-size: 13px; }
.landing-stat-note { text-align: center; font-size: 11.5px; color: var(--muted-2); margin-top: 12px; }

/* ==========================================================================
   12. 响应式
   ========================================================================== */
@media (max-width: 1280px) {
  .ov-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar .menu-toggle { display: inline-flex; }
  .landing-nav .nav-links { display: none; }
}

@media (max-width: 900px) {
  .plan-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .imp-inner { padding: 9px 14px; font-size: 12.5px; gap: 8px; }
  .imp-exit { margin-left: 0; width: 100%; }
  .portal-footer { padding: 14px 16px; justify-content: center; text-align: center; }
  .ov-stats { grid-template-columns: minmax(0, 1fr); }
  .plan-metrics { grid-template-columns: minmax(0, 1fr); }
  .plan-days { text-align: left; }
  .quick-grid { grid-template-columns: minmax(0, 1fr); }
  .kv-grid, .account-rows { grid-template-columns: minmax(0, 1fr); gap: 3px 0; }
  .kv-grid dt, .account-rows dt { margin-top: 8px; font-size: 12px; }
  .detail-actions { width: 100%; }
  .detail-actions .btn { flex: 1 1 auto; }
  .cert-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .verify-row { flex-wrap: wrap; }
  .verify-row .vr-label { flex: 0 0 100%; }
  .verify-row .btn { flex: 0 0 auto; }
  .search .input { min-width: 0; width: 100%; }
  .filter-bar { width: 100%; }
  .filter-bar .search { flex: 1 1 100%; }
  .filter-bar .select { flex: 1 1 auto; width: 100%; }
  .landing-section { padding-left: 18px; padding-right: 18px; }
  .plan-grid { margin-top: 26px; }
}
