:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-fg: #ffffff;
  --primary-weak: #eff6ff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .04);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.25; }

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { font-weight: 700; font-size: 17px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.brand-logo { height: 28px; width: auto; display: block; }
.uc-brand .brand-logo { height: 26px; }
.nav-links { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-links a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.nav-links a:hover { background: var(--primary-weak); color: var(--primary); }
.nav-user { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--fg); }
.btn-outline:hover { background: #f1f5f9; }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: #f1f5f9; }
.btn-danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { padding: 18px 20px; border-bottom: 1px solid var(--border); font-weight: 600; }

/* Grid */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Hero */
.hero { background: linear-gradient(180deg, #eef2ff, var(--bg)); border-bottom: 1px solid var(--border); }
.hero-inner { padding: 72px 0; }
.hero h1 { font-size: 40px; margin: 12px 0; }
.hero p { font-size: 18px; color: var(--muted); max-width: 640px; }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* Sections */
.section { padding: 56px 0; }
.section h2 { font-size: 24px; margin: 0 0 24px; }

/* Product card */
.pcard { display: flex; flex-direction: column; padding: 20px; }
.pcard h3 { margin: 6px 0; font-size: 17px; }
.spec { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }
.spec .k { color: var(--muted); }
.pcard-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: flex-end; justify-content: space-between; }
.price { font-size: 26px; font-weight: 700; }
.price small { font-size: 13px; font-weight: 400; color: var(--muted); }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-blue { background: var(--primary-weak); color: var(--primary); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #fafbfc; }
tbody tr:hover { background: #fafbfc; }
.right { text-align: right; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px;
  font: inherit; background: #fff; color: var(--fg);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; padding: 10px 12px; border-radius: 9px; margin-bottom: 14px; font-size: 14px; }
.flash { background: var(--primary-weak); color: var(--primary); border: 1px solid #bfdbfe; padding: 10px 14px; border-radius: 9px; margin: 16px 0; font-size: 14px; }

.auth-wrap { max-width: 420px; margin: 48px auto; }

/* ============ 登录 / 注册：沉浸式深色页 ============ */
.auth-body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; color: #fff;
  background:
    radial-gradient(900px 500px at 12% 18%, rgba(59,130,246,.38), transparent 60%),
    radial-gradient(760px 460px at 88% 82%, rgba(139,92,246,.30), transparent 60%),
    linear-gradient(140deg, #0b1220, #16233f 55%, #0b1220);
  background-attachment: fixed; }
/* 网格光效 */
.auth-body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 38%, #000, transparent 78%);
  mask-image: radial-gradient(circle at 50% 38%, #000, transparent 78%); }
.auth-page { flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; position: relative; z-index: 1; }
.auth-grid { display: grid; grid-template-columns: 1fr 420px; gap: 56px; align-items: center;
  max-width: 1020px; width: 100%; }
@media (max-width: 940px) { .auth-grid { grid-template-columns: 1fr; max-width: 420px; gap: 24px; } .auth-hero { display: none; } }

/* 左侧品牌卖点 */
.auth-hero .auth-brand { display: inline-block; font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 22px; }
.auth-hero h2 { font-size: 32px; margin: 0 0 12px; color: #fff; line-height: 1.25; }
.auth-hero h2 em { font-style: normal; color: #60a5fa; }
.auth-hero p { color: rgba(255,255,255,.7); margin: 0 0 26px; font-size: 15px; max-width: 440px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.85); font-size: 14px; }
.auth-points .ic { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 16px; }

/* 手机端顶部品牌 */
.auth-mobile-brand { display: none; text-align: center; margin-bottom: 18px; font-size: 18px; font-weight: 700; color: #fff; }
@media (max-width: 940px) { .auth-mobile-brand { display: block; } }

/* 表单卡 */
.auth-card { background: #fff; color: var(--fg); border-radius: 16px; padding: 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.38); }
.auth-card h2 { margin: 0 0 4px; font-size: 22px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.auth-card form { margin-top: 18px; }
.auth-alt { text-align: center; font-size: 14px; color: var(--muted); margin: 16px 0 0; }
.auth-alt a { color: var(--primary); font-weight: 500; }

.auth-flash { max-width: 420px; margin: 0 auto 16px; padding: 10px 14px; border-radius: 9px; font-size: 14px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); color: #fff; }
.auth-foot { text-align: center; position: relative; z-index: 1; font-size: 12px; color: rgba(255,255,255,.45);
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (max-width: 560px) { .auth-card { padding: 24px 20px; } .auth-page { padding: 28px 16px; } }

/* Features */
.feature .emoji { font-size: 26px; }
.feature h4 { margin: 8px 0 4px; }

/* Footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--border); background: #fff; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding: 40px 0; }
.foot-grid a { display: block; color: var(--muted); font-size: 14px; padding: 2px 0; }
.foot-grid a:hover { color: var(--primary); }
.foot-title { font-weight: 600; margin-bottom: 8px; }
.foot-copy { text-align: center; padding: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* Configurator */
.configure-page { min-height: 70vh; background: #f8fafc; }
.configure-shell { max-width: 1180px; }
.configure-back { display: inline-flex; margin-bottom: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.configure-back:hover { color: var(--primary); }
.configure-title { margin: 0 0 34px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.035em; }
.configure-product-title { margin: 6px 0 7px; font-size: 25px; letter-spacing: -.018em; }
.cfg { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 30px; align-items: start; }
@media (max-width: 900px) { .cfg { grid-template-columns: 1fr; } .cfg-panel { position: static; } }
.cfg-panel { position: sticky; top: 76px; }
.configure-product-card { margin-top: 19px; box-shadow: none; }
.configure-product-card .card-head { font-size: 18px; }
.configure-product-card .spec { min-height: 40px; align-items: center; border-bottom: 1px solid #eef2f7; }
.configure-product-card .spec:last-child { border-bottom: 0; }
.configure-options-card { margin-top: 16px; box-shadow: none; }
.configure-options-card .card-head { font-size: 18px; }
.configure-options-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 18px; }
.configure-options-grid .field { margin: 0; }
.configure-options-grid .field label { margin-bottom: 7px; color: #344258; font-weight: 650; }
.configure-options-grid select { min-height: 43px; background-color: #fbfdff; }
.configure-form { overflow: hidden; border-radius: 14px; box-shadow: 0 16px 38px rgba(15,23,42,.10); }
.configure-form .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 22px; font-size: 18px; }
.configure-form .card-head small { color: var(--muted); font-size: 11px; font-weight: 500; }
.configure-form .card-pad { padding: 22px; }
.configure-form .field { margin-bottom: 17px; }
.configure-form .field label { margin-bottom: 7px; color: #344258; font-weight: 650; }
.configure-form select { min-height: 43px; background-color: #fbfdff; }
.configure-form .summary { margin-top: 18px; padding: 16px; border-radius: 10px; background: #f8fafc; }
.configure-form .summary .total { color: var(--primary); }
.configuration-lines { display: flex; flex-direction: column; }
.configuration-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #edf1f7; }
.configuration-line:first-child { padding-top: 0; }
.configuration-line span { min-width: 0; }
.configuration-line strong, .configuration-line small { display: block; }
.configuration-line strong { color: #2d3b52; font-size: 13px; }
.configuration-line small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.configuration-line b { flex-shrink: 0; color: #53627a; font-size: 12px; font-weight: 650; }
.configuration-line.base b { color: var(--primary); font-size: 16px; }
.summary { font-size: 14px; }
.summary .row { display: flex; justify-content: space-between; padding: 3px 0; }
.summary .total { font-size: 24px; font-weight: 700; }
.summary hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
@media (max-width: 760px) {
  .configure-shell { padding-top: 34px; }
  .configure-title { margin-bottom: 26px; }
  .configure-form .card-pad { padding: 18px; }
  .configure-options-grid { grid-template-columns: 1fr; }
}

/* Admin */
.admin-body { display: flex; min-height: 100vh; }
.admin-side { width: 232px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-side .brand { padding: 0 8px 16px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500; }
.admin-nav a:hover { background: #f1f5f9; color: var(--fg); }
.admin-nav a.active { background: var(--primary); color: #fff; }
.admin-nav .emoji { width: 18px; text-align: center; }
.admin-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; }
.admin-main { flex: 1; padding: 28px 32px; max-width: 1000px; }
.admin-main h1 { margin-top: 0; }
.stat { padding: 18px 20px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .num { font-size: 30px; font-weight: 700; margin-top: 4px; }
@media (max-width: 760px) {
  .admin-body { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: sticky; top: 0; z-index: 30; flex-direction: column; padding: 10px 12px; }
  .admin-side .brand { padding: 2px 4px 8px; font-size: 16px; }
  .admin-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .admin-nav::-webkit-scrollbar { height: 0; }
  .admin-nav a { flex-shrink: 0; white-space: nowrap; padding: 8px 12px; }
  .admin-side-foot { margin-top: 8px; padding-top: 8px; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .admin-side-foot .muted { width: 100%; }
}

/* Dialog (details/summary based) */
details.dlg > summary { list-style: none; cursor: pointer; display: inline-block; }
details.dlg > summary::-webkit-details-marker { display: none; }
details.dlg[open] > .dlg-body { display: block; }
.dlg-body { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.dlg-card { background: #fff; border-radius: 14px; width: 100%; max-width: 520px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.dlg-card h3 { margin: 0 0 4px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.stack { display: flex; flex-direction: column; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tag { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--muted); }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 8px; }
.section-title { display:flex; align-items:center; gap:10px; margin: 24px 0 12px; }

/* ============ 后台规范化组件 ============ */
/* 页头：标题 + 副标题 + 右侧操作 */
.page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin: 0 0 22px; }
.page-head h1 { margin:0; font-size:24px; }
.page-head .sub { color:var(--muted); font-size:14px; margin:4px 0 0; }
.page-head-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* KPI 统计卡 */
.kpi-grid { display:grid; gap:16px; grid-template-columns:repeat(4,1fr); margin-bottom:24px; }
@media (max-width:900px){ .kpi-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px){ .kpi-grid { grid-template-columns:1fr; } }
.kpi { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px 18px; display:block; }
.kpi .label { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.03em; display:flex; align-items:center; gap:6px; }
.kpi .num { font-size:28px; font-weight:700; margin-top:6px; line-height:1.1; }
.kpi .foot { font-size:12px; color:var(--muted); margin-top:4px; }
.kpi.accent { border-color:#bfdbfe; }
.kpi.accent .num { color:var(--primary); }
.kpi.rev .num { color:#166534; }
.kpi.warn .num { color:#b45309; }

/* 卡片带表头（区块） */
.panel { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); margin-bottom:22px; overflow:hidden; }
.panel > .panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-bottom:1px solid var(--border); font-weight:600; }
.panel > .panel-head .muted { font-weight:400; }
.panel > .table-wrap { border:none; box-shadow:none; }
.panel > table { margin:0; }

/* 工具条 / 过滤标签 */
.toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.seg { display:inline-flex; gap:2px; background:#f1f5f9; border:1px solid var(--border); border-radius:10px; padding:3px; }
.seg a { padding:6px 14px; border-radius:8px; font-size:13px; font-weight:500; color:var(--muted); }
.seg a:hover { color:var(--fg); }
.seg a.active { background:#fff; color:var(--primary); box-shadow:var(--shadow); }
.seg a .cnt { font-size:11px; opacity:.7; margin-left:4px; }

/* 定义列表（键值明细） */
.dl { display:grid; grid-template-columns:auto 1fr; gap:8px 18px; font-size:14px; }
.dl dt { color:var(--muted); }
.dl dd { margin:0; text-align:right; }
@media (max-width:520px){ .dl { grid-template-columns:1fr; gap:2px 0; } .dl dd { text-align:left; margin-bottom:8px; } }

/* 金额强调 */
.money { font-variant-numeric:tabular-nums; font-weight:600; }
.money-pos { color:#166534; }
.money-muted { color:var(--muted); }

/* 空状态 */
.empty { text-align:center; color:var(--muted); padding:40px 20px; }
.empty .ico { font-size:34px; display:block; margin-bottom:8px; opacity:.6; }

/* 到期提示 */
.due-soon { color:#b45309; font-weight:600; }
.due-over { color:#dc2626; font-weight:600; }

/* 后台正文加宽以容纳财务表格 */
.admin-main.wide { max-width:1180px; }

/* 可折叠分类卡（产品页） */
details.cat-fold { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); margin-bottom:14px; }
details.cat-fold > summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:10px; padding:14px 18px; font-weight:600; user-select:none; border-radius:var(--radius); }
details.cat-fold > summary::-webkit-details-marker { display:none; }
details.cat-fold > summary:hover { background:#fafbfc; }
.cat-fold .cat-name { font-size:16px; }
.cat-fold .fold-caret { margin-left:auto; transition:transform .2s; color:var(--muted); font-size:13px; }
details.cat-fold[open] > summary { border-bottom:1px solid var(--border); border-radius:var(--radius) var(--radius) 0 0; }
details.cat-fold[open] > summary .fold-caret { transform:rotate(90deg); }
.cat-body .cat-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 16px; border-bottom:1px solid var(--border); }
.cat-body > .table-wrap { border:0; box-shadow:none; }
.cat-body .empty { padding:26px 16px; }

/* ============ 首页：轮播图 ============ */
.slider { position: relative; background: #0b1220; overflow: hidden; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; min-width: 100%; scroll-snap-align: start; display: flex; align-items: center;
  min-height: 420px; color: #fff; overflow: hidden; }
.slide::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: linear-gradient(90deg, #000, transparent 70%); }
.slide-s1 { background: linear-gradient(90deg, rgba(9,14,28,.94) 0%, rgba(9,14,28,.74) 38%, rgba(9,14,28,.30) 68%, rgba(9,14,28,.08) 100%), url(/assets/banners/fdddos-banner-01-server-v2.png) center right / cover no-repeat #0b1220; }
.slide-s2 { background: linear-gradient(90deg, rgba(6,17,26,.94) 0%, rgba(6,17,26,.74) 38%, rgba(6,17,26,.30) 68%, rgba(6,17,26,.08) 100%), url(/assets/banners/fdddos-banner-02-defense-v2.png) center right / cover no-repeat #06131f; }
.slide-s3 { background: linear-gradient(90deg, rgba(8,12,26,.94) 0%, rgba(8,12,26,.74) 38%, rgba(8,12,26,.30) 68%, rgba(8,12,26,.08) 100%), url(/assets/banners/fdddos-banner-03-network-v2.png) center right / cover no-repeat #0b1220; }
.slide-art { display: none; }
.slide-inner { position: relative; z-index: 2; padding: 56px 20px; max-width: 1120px; margin: 0 auto; width: 100%; }
.slide-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(4px); }
.slide h2 { font-size: 38px; margin: 14px 0 10px; line-height: 1.2; max-width: 720px; }
.slide h2 em { font-style: normal; color: #fbbf24; }
.slide-s2 h2 em { color: #34d399; }
.slide-s3 h2 em { color: #c4b5fd; }
.slide p { font-size: 16px; color: rgba(255,255,255,.78); max-width: 620px; margin: 0 0 20px; }
.slide-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.slide .btn-white { background: #fff; color: #0b1220; }
.slide .btn-white:hover { background: #e2e8f0; }
.slide .btn-line { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.slide .btn-line:hover { background: rgba(255,255,255,.12); }
.slide-price { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 18px; }
.slide-price b { font-size: 40px; color: #fbbf24; line-height: 1; }
.slide-price span { color: rgba(255,255,255,.7); font-size: 14px; }
.slide-art { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); z-index: 1;
  font-size: 150px; opacity: .16; filter: blur(.4px); user-select: none; }
/* 箭头 / 圆点 */
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(0,0,0,.28); color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s; }
.slider-arrow:hover { background: rgba(0,0,0,.5); }
.slider-arrow.prev { left: 16px; } .slider-arrow.next { right: 16px; }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 5;
  display: flex; justify-content: center; gap: 8px; }
.slider-dots .dot { width: 26px; height: 4px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.34); transition: background .2s, width .2s; padding: 0; }
.slider-dots .dot.active { background: #fff; width: 34px; }

/* ============ 首页：产品 Tab 分组 ============ */
.ptabs { position: relative; }
.ptab-radio { position: absolute; opacity: 0; pointer-events: none; }
.ptab-labels { display: flex; gap: 4px; background: #eef2f7; border: 1px solid var(--border);
  border-radius: 12px; padding: 4px; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.ptab-labels::-webkit-scrollbar { display: none; }
.ptab-labels label { flex: 1; text-align: center; white-space: nowrap; padding: 10px 16px; border-radius: 9px;
  font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.ptab-labels label:hover { color: var(--fg); }
.ptab-labels label .cnt { font-size: 12px; opacity: .65; margin-left: 4px; }
.ptab-panel { display: none; }

/* 产品卡片（首页用） */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .prod-grid { grid-template-columns: 1fr; } }
.prod-card { display: flex; flex-direction: column; padding: 18px; position: relative; transition: border-color .15s, transform .15s; }
.prod-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.prod-card .pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.prod-card h3 { margin: 0; font-size: 16px; }
.prod-card .pc-loc { font-size: 12px; color: var(--muted); margin-top: 3px; }
.pc-specs { margin: 14px 0; padding: 12px 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 6px; }
.pc-specs .r { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.pc-specs .r .k { color: var(--muted); flex-shrink: 0; }
.pc-specs .r .v { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-specs .r .v.def { color: #166534; font-weight: 600; }
.pc-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.pc-price { font-size: 24px; font-weight: 700; color: var(--primary); line-height: 1.1; }
.pc-price small { font-size: 12px; font-weight: 400; color: var(--muted); }

/* ============ 首页：防御优势 ============ */
.adv-wrap { background: linear-gradient(160deg, #0b1220, #13243f 60%, #0b1220); color: #fff; }
.adv-wrap .section h2, .adv-wrap h3 { color: #fff; }
.adv-lead { color: rgba(255,255,255,.7); max-width: 640px; margin: -12px 0 28px; }
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .adv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .adv-grid { grid-template-columns: 1fr; } }
.adv-card { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 20px; }
.adv-card .ico { font-size: 26px; }
.adv-card h4 { margin: 10px 0 6px; font-size: 16px; }
.adv-card p { margin: 0; font-size: 13px; color: rgba(255,255,255,.68); line-height: 1.65; }
/* 防御档位条 */
.def-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 28px; }
@media (max-width: 760px) { .def-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .def-strip { grid-template-columns: repeat(2, 1fr); } }
.def-item { text-align: center; padding: 14px 8px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.def-item b { display: block; font-size: 19px; color: #34d399; }
.def-item span { font-size: 12px; color: rgba(255,255,255,.6); }

/* ============ 首页：解决方案 ============ */
.sol-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .sol-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .sol-grid { grid-template-columns: 1fr; } }
.sol-card { padding: 20px; display: block; transition: border-color .15s, transform .15s; }
.sol-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.sol-card .ico { font-size: 26px; }
.sol-card h4 { margin: 8px 0 4px; font-size: 15px; }
.sol-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* 区块小标题 */
.sec-head { text-align: center; margin-bottom: 28px; }
.sec-head h2 { margin: 0 0 8px; }
.sec-head p { margin: 0; color: var(--muted); font-size: 15px; }

@media (max-width: 760px) {
  .slide { min-height: 340px; }
  .slide-inner { padding: 40px 16px; }
  .slide h2 { font-size: 24px; }
  .slide p { font-size: 14px; }
  .slide-price b { font-size: 32px; }
  .slide-art { display: none; }
  .slider-arrow { display: none; }
  .slide-actions .btn { flex: 1; justify-content: center; }
}

/* ============ 工单对话 ============ */
.tk-msg { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.tk-msg:last-child { border-bottom: 0; }
.tk-av { width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; font-weight: 700; text-transform: uppercase;
  background: #e2e8f0; color: #475569; font-size: 15px; }
.tk-msg.staff .tk-av { background: var(--primary); color: #fff; }
.tk-body { flex: 1; min-width: 0; }
.tk-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 5px; font-size: 13px; }
.tk-meta .muted { font-size: 12px; }
.tk-text { font-size: 14px; line-height: 1.75; color: var(--fg); word-break: break-word;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.tk-msg.staff .tk-text { background: var(--primary-weak); border-color: #bfdbfe; }

/* 验证码 */
.cap-row { display: flex; gap: 10px; align-items: stretch; }
.cap-row input { flex: 1; min-width: 0; }
.cap-img { width: 120px; height: 40px; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; flex-shrink: 0; background: #f1f5f9; }
.cap-img:hover { border-color: var(--primary); }

/* ============ 产品挑选页（左筛选 + 右卡片）============ */
.catalog-page { background: #f7f9fc; min-height: 70vh; }
.catalog-hero { position: relative; overflow: hidden; text-align: center; background: #fff; border-bottom: 1px solid #edf1f7; }
.catalog-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 35%, rgba(37,99,235,.10), transparent 28%), radial-gradient(circle at 82% 28%, rgba(14,165,233,.09), transparent 24%); }
.catalog-hero-inner { position: relative; padding: 72px 20px 68px; }
.catalog-kicker { display: block; margin-bottom: 18px; color: var(--primary); font-size: 13px; font-weight: 800; letter-spacing: .18em; }
.catalog-hero h1 { margin: 0 auto 14px; max-width: 760px; font-size: clamp(34px, 5vw, 56px); letter-spacing: -.035em; }
.catalog-hero p { max-width: 720px; margin: 0 auto 26px; color: var(--muted); font-size: 17px; }
.catalog-hero .btn + .btn { margin-left: 8px; }
.catalog-content { padding-top: 22px; padding-bottom: 64px; }
.catalog-filters { padding: 22px 24px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.filter-row { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: start; }
.filter-row + .filter-row { margin-top: 16px; }
.filter-label { padding-top: 9px; color: #8491a5; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.filter-options { display: flex; flex-wrap: wrap; gap: 9px; }
.filter-chip { appearance: none; min-height: 38px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #253047; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; transition: .18s ease; }
.filter-chip:hover { border-color: #9bb7f6; color: var(--primary); }
.filter-chip.active { border-color: var(--primary); background: linear-gradient(135deg, #2563eb, #0d7df2); color: #fff; box-shadow: 0 7px 18px rgba(37,99,235,.22); }
.catalog-intro { margin-top: 32px; }
.catalog-intro h2 { margin: 0 0 5px; font-size: 24px; }
.catalog-intro p { margin: 0; color: var(--muted); font-size: 14px; }
.catalog-notice { margin: 17px 0; padding: 12px 15px; border: 1px solid #dbeafe; border-radius: 9px; background: #eff6ff; color: #31547f; font-size: 13px; }
.pk-bread { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.pk-bread .back { color: var(--muted); font-size: 14px; }
.pk-bread .back:hover { color: var(--primary); }
.pk-bread h1 { margin: 0; font-size: 19px; }
.pk-bread .sub { color: var(--muted); font-size: 14px; }

.pk-layout { display: grid; grid-template-columns: 264px 1fr; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .pk-layout { grid-template-columns: 1fr; } .pk-side { position: static !important; } }

/* 左侧筛选 */
.pk-side { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  position: sticky; top: 76px; box-shadow: var(--shadow); }
.pk-search { padding: 12px; border-bottom: 1px solid var(--border); }
.pk-search input { width: 100%; height: 38px; padding: 6px 12px; border: 1px solid var(--border);
  border-radius: 999px; font: inherit; font-size: 14px; background: #fff; }
.pk-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.pk-group { border-bottom: 1px solid var(--border); }
.pk-group:last-child { border-bottom: 0; }
.pk-group > summary { list-style: none; cursor: pointer; padding: 13px 14px; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; user-select: none; }
.pk-group > summary::-webkit-details-marker { display: none; }
.pk-group > summary:hover { background: #fafbfc; }
.pk-group > summary .car { color: var(--muted); font-size: 11px; transition: transform .2s; }
.pk-group[open] > summary .car { transform: rotate(180deg); }
.pk-items { padding-bottom: 6px; }
.pk-items a { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; border-left: 3px solid transparent; color: var(--muted); font-size: 14px; }
.pk-items a:hover { background: #f8fafc; color: var(--fg); }
.pk-items a.active { border-left-color: var(--primary); background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.pk-tag { font-size: 11px; padding: 1px 6px; border-radius: 3px; font-weight: 500; flex-shrink: 0; }
.pk-tag.hot { background: #fee2e2; color: #dc2626; }
.pk-tag.def { background: #dcfce7; color: #166534; }
.pk-tag.num { background: #f1f5f9; color: #64748b; }

/* 右侧卡片 */
.pk-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.pk-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  display: grid; grid-template-columns: minmax(220px,1.15fr) minmax(390px,2.2fr) minmax(150px,.72fr) 150px;
  align-items: stretch; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pk-card[hidden] { display: none !important; }
.pk-card:hover { border-color: var(--primary); box-shadow: 0 8px 24px rgba(37,99,235,.12); transform: translateY(-2px); }
.pk-head { min-height: 104px; padding: 18px 20px; background: #fbfcfe; border-right: 1px solid var(--border);
  font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pk-head strong { display: block; font-size: 15px; color: #172036; }
.pk-location { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 500; }
.pk-specs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: center; gap: 0; padding: 17px 8px; }
.pk-specs .r { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 4px; padding: 4px 13px; border-right: 1px solid #eef2f7; font-size: 13px; }
.pk-specs .r:last-child { border-right: 0; }
.pk-specs .r .k { color: var(--muted); flex-shrink: 0; }
.pk-specs .r .v { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.pk-specs .r .v.def { color: #166534; font-weight: 600; }
.pk-price-box { display: flex; flex-direction: column; justify-content: center; padding: 16px 18px; border-left: 1px solid var(--border); }
.pk-price { font-size: 27px; font-weight: 750; color: #172036; line-height: 1.1; }
.pk-price::first-letter { color: var(--primary); }
.pk-price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.pk-orig { font-size: 12px; color: var(--muted); margin-top: 5px; }
.pk-off { color: #e11d48; font-weight: 600; }
.pk-buy { display: flex; align-items: center; justify-content: center; align-self: center; min-height: 42px; margin: 0 18px; text-align: center; padding: 11px 15px; border-radius: 8px; background: linear-gradient(135deg, #2563eb, #0d7df2); color: #fff; font-weight: 600; font-size: 14px; }
.pk-buy:hover { background: #1d4ed8; }

@media (max-width: 980px) {
  .pk-card { grid-template-columns: minmax(210px,1fr) minmax(0,2fr) 145px; }
  .pk-price-box { border-left: 1px solid var(--border); }
  .pk-buy { grid-column: 1 / -1; width: auto; margin: 0 16px 16px; }
}

@media (max-width: 720px) {
  .pk-card { display: flex; flex-direction: column; }
  .pk-head { min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .pk-specs { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 10px; }
  .pk-specs .r { border-right: 0; border-bottom: 1px solid #eef2f7; }
  .pk-price-box { border-left: 0; }
  .pk-buy { display: block; margin: 0 16px 16px; }
}

@media (max-width: 760px) {
  .catalog-hero-inner { padding: 52px 16px 48px; }
  .catalog-hero p { font-size: 15px; }
  .catalog-hero .btn { width: 100%; }
  .catalog-hero .btn + .btn { margin: 10px 0 0; }
  .catalog-filters { padding: 18px 16px; }
  .filter-row { grid-template-columns: 1fr; gap: 7px; }
  .filter-label { padding-top: 0; }
  .filter-chip { padding: 8px 13px; }
}

/* ============ 用户中心（魔方客户端风格）============ */
.uc-body { display: flex; min-height: 100vh; background: #f0f2f5; }
/* 左侧栏（白色） */
.uc-side { width: 232px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.uc-side .uc-brand { display: flex; align-items: center; gap: 8px; padding: 16px 18px; color: var(--fg);
  font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.uc-nav { padding: 6px 0 20px; flex: 1; }
.uc-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 18px; color: var(--muted); font-size: 14px; font-weight: 500; }
.uc-nav a:hover { background: #f1f5f9; color: var(--fg); }
.uc-nav a.active { background: var(--primary); color: #fff; }
.uc-nav .grp { padding: 16px 18px 6px; font-size: 12px; color: #94a3b8; }
.uc-nav .ico { width: 18px; text-align: center; flex-shrink: 0; }
/* 顶栏（白色） */
.uc-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.uc-top { height: 58px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end;
  gap: 4px; padding: 0 18px; position: sticky; top: 0; z-index: 20; flex-shrink: 0; }
.uc-top a { color: var(--muted); font-size: 13px; padding: 7px 10px; border-radius: 6px;
  display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.uc-top a:hover { background: #f1f5f9; color: var(--fg); }
.uc-top .uc-me { color: var(--fg); }
.uc-avatar-sm { width: 28px; height: 28px; border-radius: 5px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; text-transform: uppercase; }
.uc-dot { background: #ef4444; color: #fff; border-radius: 999px; font-size: 10px; padding: 1px 5px; font-weight: 700; }
/* 主体 */
.uc-main { flex: 1; padding: 0 24px 28px; min-width: 0; }
.uc-head { background: #fff; margin: 0 -24px 20px; padding: 16px 24px 0; border-bottom: 1px solid var(--border); }
.uc-head h1 { margin: 0; font-size: 18px; padding-bottom: 12px; display: inline-block; border-bottom: 2px solid var(--primary); }
.uc-grid { display: grid; grid-template-columns: 1fr 336px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .uc-grid { grid-template-columns: 1fr; } }
.uc-card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 18px; }
.uc-card h3 { margin: 0 0 16px; font-size: 15px; }
/* 用户信息 */
.uc-userinfo { display: flex; gap: 24px; flex-wrap: wrap; }
.uc-avatar-lg { width: 104px; height: 104px; border-radius: 8px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 52px; font-weight: 700;
  text-transform: uppercase; flex-shrink: 0; }
.uc-info-grid { display: grid; grid-template-columns: auto auto; gap: 12px 44px; font-size: 14px; align-content: start; }
@media (max-width: 620px) { .uc-info-grid { grid-template-columns: 1fr; gap: 8px; } }
.uc-info-grid .k { color: var(--muted); }
.uc-tier { display: inline-flex; align-items: center; gap: 6px; background: #fff7ed; border: 1px solid #fed7aa;
  color: #c2410c; border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.uc-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); }
/* 统计卡 */
.uc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 900px) { .uc-stats { grid-template-columns: repeat(2, 1fr); } }
.uc-stat { background: #fff; border-radius: 8px; padding: 18px; }
.uc-stat .t { font-size: 14px; font-weight: 600; }
.uc-stat .n { font-size: 34px; font-weight: 700; margin: 14px 0; line-height: 1; color: var(--fg); }
.uc-stat .n small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.uc-stat.blue .n { color: var(--primary); } .uc-stat.green .n { color: #22c55e; }
.uc-stat.red .n { color: #ef4444; } .uc-stat.orange .n { color: #f59e0b; }
.uc-stat .lnk { border-top: 1px solid var(--border); padding-top: 10px; font-size: 12px; display: flex; gap: 10px; }
.uc-stat .lnk a { color: var(--muted); } .uc-stat .lnk a:hover { color: var(--primary); }
/* 费用信息 */
.uc-fee .amt { font-size: 34px; font-weight: 700; line-height: 1; }
.uc-fee-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.uc-fee-box { background: #f5f6f8; border-radius: 6px; padding: 12px; }
.uc-fee-box .k { font-size: 12px; color: var(--muted); }
.uc-fee-box .v { font-size: 18px; font-weight: 700; margin-top: 5px; }
/* 已开通产品 */
.uc-prod { border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.uc-prod:last-child { margin-bottom: 0; }
.uc-prod .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
/* 移动端：侧栏变横向滚动条 */
@media (max-width: 900px) {
  .uc-body { flex-direction: column; }
  .uc-side { width: 100%; height: auto; position: static; }
  .uc-nav { display: flex; overflow-x: auto; padding: 6px; gap: 2px; }
  .uc-nav::-webkit-scrollbar { height: 0; }
  .uc-nav .grp { display: none; }
  .uc-nav a { white-space: nowrap; flex-shrink: 0; padding: 9px 13px; border-radius: 7px; }
  .uc-top { justify-content: space-between; padding: 0 12px; overflow-x: auto; }
  .uc-main { padding: 0 14px 22px; }
  .uc-head { margin: 0 -14px 16px; padding: 14px 14px 0; }
  .uc-avatar-lg { width: 72px; height: 72px; font-size: 36px; }
}

/* ============ 智简魔方风格 · 仪表盘首页 ============ */
.mf-greet { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.mf-greet b { color: var(--fg); font-weight: 600; }
.mf-dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1100px) { .mf-dash { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .mf-dash { grid-template-columns: 1fr; } }
.mf-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mf-card .mf-h { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.mf-card .mf-h h3 { margin: 0; font-size: 15px; }
.mf-card .mf-h .dots { color: var(--muted); letter-spacing: 2px; font-weight: 700; }
.mf-card .mf-b { padding: 18px; flex: 1; }

/* 订单概览：4 列 */
.mf-ordcols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.mf-ordcols .c { padding: 2px; }
.mf-ordcols .t { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mf-ordcols .n { font-size: 26px; font-weight: 700; color: var(--primary); margin: 10px 0; line-height: 1; }
.mf-ordcols .s { font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 8px; }

/* 代办事项：2×2 彩色块 */
.mf-todo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mf-todo a { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; transition: border-color .15s, background .15s; }
.mf-todo a:hover { border-color: var(--primary); background: #fafbff; }
.mf-todo .ic { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; flex-shrink: 0; }
.mf-todo .ic.blue { background: #3b82f6; } .mf-todo .ic.green { background: #22c55e; } .mf-todo .ic.orange { background: #f59e0b; } .mf-todo .ic.cyan { background: #06b6d4; }
.mf-todo .n { font-size: 22px; font-weight: 700; line-height: 1; }
.mf-todo .t { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* 收入概览 */
.mf-income { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 10px; }
.mf-income .t { font-size: 12px; color: var(--muted); margin-top: 4px; }
.mf-income .sm { font-size: 22px; font-weight: 700; line-height: 1; }
.mf-income .lg { font-size: 30px; font-weight: 700; line-height: 1; }
.mf-income .orange { color: #f59e0b; } .mf-income .blue { color: var(--primary); } .mf-income .fg { color: var(--fg); }

/* 大数字卡（即将到期 / 在线管理员）*/
.mf-big { text-align: center; padding: 26px 0; }
.mf-big .n { font-size: 50px; font-weight: 700; color: var(--primary); line-height: 1; }
.mf-big .t { color: var(--muted); margin-top: 12px; }

/* 在线管理员 */
.mf-admin { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.mf-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; text-transform: uppercase; }
.mf-admin .nm { font-weight: 600; } .mf-admin .sub { font-size: 12px; color: var(--muted); }

/* 客户概况 */
.mf-custstat { display: flex; gap: 20px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.mf-custstat .x b { font-size: 22px; } .mf-custstat .x span { font-size: 12px; color: var(--muted); margin-left: 5px; }
.mf-userlist a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.mf-userlist a:last-child { border-bottom: 0; }
.mf-userlist .u { color: var(--primary); } .mf-userlist .m { color: var(--muted); font-size: 12px; }

/* ============ 智简魔方风格 · 财务后台 ============ */
.mf-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 1100px) { .mf-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .mf-stats { grid-template-columns: repeat(2, 1fr); } }
.mf-stat { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px 16px 14px; position: relative; overflow: hidden; }
.mf-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); opacity: .8; }
.mf-stat.g::before { background: #16a34a; } .mf-stat.o::before { background: #d97706; } .mf-stat.r::before { background: #dc2626; } .mf-stat.p::before { background: #7c3aed; }
.mf-stat .lbl { font-size: 13px; color: var(--muted); }
.mf-stat .val { font-size: 23px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.mf-stat.g .val { color: #16a34a; } .mf-stat.b .val { color: var(--primary); } .mf-stat.o .val { color: #d97706; } .mf-stat.r .val { color: #dc2626; } .mf-stat.p .val { color: #7c3aed; }
.mf-stat .ic { position: absolute; right: 12px; top: 14px; font-size: 20px; opacity: .3; }

/* 筛选栏 */
.filter-bar { background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
  padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 16px; }
.filter-bar .fi { display: flex; flex-direction: column; gap: 5px; }
.filter-bar .fi label { font-size: 12px; color: var(--muted); }
.filter-bar .fi input, .filter-bar .fi select { height: 38px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; background: #fff; color: var(--fg); }
.filter-bar .fi input:focus, .filter-bar .fi select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.filter-bar .fi.kw input { min-width: 200px; }
.filter-bar .fi input[type=date] { min-width: 150px; }
.filter-bar .fb-actions { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 640px) { .filter-bar .fi.kw input, .filter-bar .fi input[type=date] { min-width: 0; width: 100%; } .filter-bar .fi { flex: 1 1 44%; } .filter-bar .fb-actions { margin-left: 0; width: 100%; } .filter-bar .fb-actions .btn { flex: 1; } }

/* 分页 */
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 14px 16px; flex-wrap: wrap; }
.pager .pinfo { margin-right: auto; color: var(--muted); font-size: 13px; }
.pager a, .pager span.cur, .pager span.dis { min-width: 32px; height: 32px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: #fff; }
.pager a { color: var(--fg); }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager span.cur { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager span.dis { color: var(--muted); opacity: .5; }

/* ============ 购物车 ============ */
.cart-link { position: relative; }
.cart-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 5px; margin-left: 5px; border-radius: 999px; background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-panel { position: sticky; top: 76px; }
@media (max-width: 900px) { .cart-panel { position: static; } }
.cart-item { margin-bottom: 14px; }
.checkout-cart { max-width: 1180px; }
.checkout-cart > .row-between { padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.checkout-cart .cart-item { border-radius: 12px; box-shadow: none; transition: border-color .16s, box-shadow .16s; }
.checkout-cart .cart-item:hover { border-color: #bfd0f5; box-shadow: 0 8px 22px rgba(37,99,235,.07); }
.checkout-summary-card { overflow: hidden; border-radius: 14px; box-shadow: 0 16px 38px rgba(15,23,42,.10); }
.checkout-summary-card .card-head { font-size: 18px; }
.checkout-summary-card .total { color: var(--primary); }
.ci-specs { margin: 12px 0; padding: 10px 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); font-size: 13px; }
.ci-specs .row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.ci-cycle { display: flex; align-items: center; gap: 8px; }
.ci-cycle select { width: auto; }

/* 轮播管理：主题色块 */
.bn-chip { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 9px; font-size: 18px; }
.bn-s1 { background: linear-gradient(135deg, #1e293b, #7c2d12); }
.bn-s2 { background: linear-gradient(135deg, #0f172a, #065f46); }
.bn-s3 { background: linear-gradient(135deg, #1e1b4b, #5b21b6); }

/* ============ 移动端适配（安卓 Chrome / iOS Safari）============ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: rgba(0,0,0,.06); }
img, svg, video { max-width: 100%; height: auto; }

/* 顶部导航：桌面默认（汉堡隐藏，菜单平铺） */
.nav-toggle-cb { display: none; }
.nav-toggle { display: none; }
.nav-menu { display: flex; flex: 1; align-items: center; gap: 20px; min-width: 0; }

@media (max-width: 760px) {
  /* --- 汉堡菜单 --- */
  .nav { position: relative; height: 56px; gap: 10px; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; margin-left: auto; cursor: pointer; border-radius: 9px; }
  .nav-toggle:active { background: #f1f5f9; }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-menu { display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; background: #fff;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); padding: 8px; max-height: calc(100dvh - 56px); overflow-y: auto; }
  .nav-toggle-cb:checked ~ .nav-menu { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; flex: none; }
  .nav-links a { padding: 12px; font-size: 15px; border-radius: 9px; }
  .nav-user { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
  .nav-user .btn { width: 100%; justify-content: center; padding: 11px 16px; font-size: 14px; }
  .nav-toggle-cb:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-cb:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-cb:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* --- Hero / 区块 --- */
  .hero-inner { padding: 44px 0; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .section { padding: 36px 0; }
  .section h2 { font-size: 20px; margin-bottom: 18px; }

  /* --- 后台正文 --- */
  .admin-main, .admin-main.wide { padding: 18px 16px; max-width: 100%; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head h1 { font-size: 21px; }
  .page-head-actions { flex-wrap: nowrap; }
  .page-head-actions .btn { flex: 1; justify-content: center; }

  /* --- iOS 聚焦不放大：表单控件字号 ≥16px；触摸目标略增大 --- */
  input[type=text], input[type=email], input[type=password], input[type=number], select, textarea { font-size: 16px; }
  .btn-sm { padding: 8px 13px; }

  /* --- 对话框贴合小屏 --- */
  .dlg-body { padding: 16px 10px; }
  .dlg-card { padding: 18px; }

  /* --- 安全区（刘海/底部横条）--- */
  .foot-copy { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .kpi .num { font-size: 24px; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 24px; }
  .brand { font-size: 15px; }
}

/* ============ 机器管理页（server.php） ============ */
.flash-warn { background: #fffbeb; color: #92400e; border-color: #fcd34d; }

/* 标签页 */
.stab-radio { position: absolute; opacity: 0; pointer-events: none; }
.stab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.stab-bar::-webkit-scrollbar { display: none; }
.stab-lbl { padding: 9px 16px; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s; }
.stab-lbl:hover { color: var(--fg); }
.stab-panel { display: none; }

/* ===== 重装系统 ===== */
.rebuild-warn { display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(180deg, #fff7ed, #fffbeb); border: 1px solid #fdba74;
  color: #9a3412; padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
.rebuild-warn .ic { font-size: 20px; line-height: 1.2; flex-shrink: 0; }
.rebuild-warn b { color: #c2410c; }
.rebuild-warn .sub { font-size: 12.5px; opacity: .82; }

.os-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.os-opt { position: relative; margin: 0; }
.os-opt input { position: absolute; opacity: 0; pointer-events: none; }
.os-card { display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 11px; background: #fff; cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s; }
.os-card:hover { border-color: #93c5fd; background: #f8fbff; }
.os-opt input:checked + .os-card { border-color: var(--primary); background: var(--primary-weak);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.os-opt input:focus-visible + .os-card { border-color: var(--primary); }
.os-logo { font-size: 24px; line-height: 1; flex-shrink: 0; }
.os-name { font-size: 13px; font-weight: 600; line-height: 1.3; word-break: break-word; }
.os-opt input:checked + .os-card .os-name { color: var(--primary); }

.rebuild-form .field label { font-weight: 600; }
.rebuild-confirm { display: flex; align-items: center; gap: 9px; padding: 12px 14px;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px;
  font-size: 13.5px; color: #991b1b; cursor: pointer; }
.rebuild-confirm input { width: auto; flex-shrink: 0; accent-color: #dc2626; }
.btn-rebuild { align-self: flex-start; padding: 10px 20px; font-weight: 600; }

/* 分区方式 */
.parti-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.parti-mode { position: relative; margin: 0; }
.parti-mode input { position: absolute; opacity: 0; pointer-events: none; }
.parti-card { display: block; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 11px;
  background: #fff; cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.parti-card b { font-size: 14px; }
.parti-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.parti-mode input:checked + .parti-card { border-color: var(--primary); background: var(--primary-weak);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.parti-editor { margin-top: 12px; padding: 14px; border: 1px dashed var(--border); border-radius: 11px; background: #fafbfc; }
.parti-disks-info { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.parti-disk-tag { display: inline-block; background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 2px 8px; margin: 0 4px 4px 0; font-size: 12px; }
.parti-row select.parti-dev { width: 150px; flex: 0 0 auto; }
.parti-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.parti-row { display: flex; gap: 8px; align-items: center; }
.parti-row input[name="pmount[]"] { flex: 1 1 auto; }
.parti-row select { width: 110px; flex: 0 0 auto; }
.parti-size { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.parti-size input { width: 92px; }
.parti-size em { color: var(--muted); font-size: 13px; font-style: normal; }
.parti-del { flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: #dc2626; cursor: pointer; font-size: 13px; line-height: 1; }
.parti-del:hover { background: #fef2f2; border-color: #fecaca; }

/* 重装进度块 */
.rb-progress { border: 1px solid #bfdbfe; background: linear-gradient(180deg, #f5f9ff, #fff); border-radius: 12px; padding: 18px; }
.rb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rb-head-txt { flex: 1; min-width: 0; }
.rb-title { font-weight: 700; font-size: 15px; }
.rb-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.rb-pct { font-size: 20px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.rb-spin { flex: 0 0 auto; width: 20px; height: 20px; border: 2.5px solid #bfdbfe; border-top-color: var(--primary);
  border-radius: 50%; animation: rb-spin 0.8s linear infinite; }
@keyframes rb-spin { to { transform: rotate(360deg); } }
.rb-bar { height: 10px; background: #e6effd; border-radius: 999px; overflow: hidden; }
.rb-bar-fill { height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #2563eb); transition: width .6s ease; }
.rb-cred { margin-top: 16px; padding: 14px; border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; }
.rb-cred-title { font-weight: 600; font-size: 13.5px; color: #92400e; margin-bottom: 8px; }
.rb-cred-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; margin: 4px 0; }
.rb-cred-row span { color: #92400e; width: 52px; flex: 0 0 auto; }
.rb-cred-row code { background: #fff; border: 1px solid #fde68a; border-radius: 6px; padding: 3px 8px;
  font-size: 13px; color: #0f172a; user-select: all; word-break: break-all; }
.rb-cred-note { margin-top: 8px; font-size: 12px; color: #b45309; }
.rb-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.rb-done { padding: 14px 16px; border: 1px solid #a7f3d0; background: #ecfdf5; color: #065f46;
  border-radius: 11px; font-size: 14px; font-weight: 500; }

/* 重装二次确认弹窗 */
.rb-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .5); padding: 20px; }
.rb-modal[hidden] { display: none; }
.rb-modal-box { background: #fff; border-radius: 14px; max-width: 400px; width: 100%; padding: 26px 24px; text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.rb-modal-ic { font-size: 40px; line-height: 1; }
.rb-modal-title { font-size: 18px; font-weight: 700; margin: 12px 0 8px; }
.rb-modal-text { font-size: 14px; color: #475569; line-height: 1.7; margin: 0 0 20px; }
.rb-modal-text b { color: #dc2626; }
.rb-modal-btns { display: flex; gap: 10px; justify-content: center; }
.rb-modal-btns .btn { min-width: 104px; }

/* 危险操作二次确认气泡 */
.act-confirm { position: relative; display: inline-block; }
.act-confirm > summary { list-style: none; cursor: pointer; }
.act-confirm > summary::-webkit-details-marker { display: none; }
.act-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 240px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); padding: 12px; }
.act-pop p { margin: 0 0 10px; font-size: 13px; color: var(--fg); }

/* 控制台入口 */
.console-row { display: flex; gap: 12px; flex-wrap: wrap; }
.console-box { flex: 1; min-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
  color: var(--fg); text-decoration: none; font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.console-box:hover { border-color: var(--primary); background: var(--primary-weak); }
.console-box .ico { font-size: 26px; }

/* 密码显示/隐藏（纯 CSS） */
.pw-wrap { display: inline-flex; align-items: center; gap: 6px; }
.pw-toggle { position: absolute; opacity: 0; pointer-events: none; }
.pw-real { display: none; }
.pw-toggle:checked ~ .pw-dots { display: none; }
.pw-toggle:checked ~ .pw-real { display: inline; }
.pw-btn { cursor: pointer; opacity: .5; font-size: 13px; user-select: none; }
.pw-btn:hover { opacity: 1; }

/* ── 控制台外壳页（console.php）──
   iframe 套住 DCIM 的控制台，保证地址栏还是本站域名。
   整页铺满：控制台是全屏应用，外面不留本站导航，免得挤压可视区域。 */
.console-page{margin:0;height:100vh;display:flex;flex-direction:column;background:#0f172a;overflow:hidden}
.console-bar{flex:0 0 auto;display:flex;align-items:center;gap:14px;padding:8px 14px;
  background:#111827;border-bottom:1px solid #1f2937;color:#e5e7eb;flex-wrap:wrap}
.console-bar .btn{color:#e5e7eb;border-color:#374151}
.console-bar .btn:hover{background:#1f2937}
.console-bar .muted{color:#9ca3af}
.console-title{font-weight:600;font-size:14px;margin-right:auto}
.console-frame{flex:1 1 auto;width:100%;border:0;display:block;background:#0f172a}

/* SSH 命令：可整行选中复制（ssh:// 协议链接多数电脑没有注册处理器，点了没反应） */
.ssh-cmd{user-select:all;-webkit-user-select:all;background:#f3f4f6;border:1px solid #e5e7eb;
  border-radius:6px;padding:3px 8px;font-size:12px;cursor:text}

/* ── 我的服务器：一行一台（servers.php）── */
.srv-row{display:flex;align-items:center;gap:14px;padding:16px 18px}
.srv-row-bd{border-top:1px solid #eef0f3}
.srv-main{flex:1 1 auto;min-width:0}
.srv-name{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.srv-name strong{font-size:15px}
.srv-ico{font-size:16px}
.srv-meta{display:flex;flex-wrap:wrap;gap:6px 16px;color:#6b7280;font-size:12px}
.srv-meta .mono{color:#374151}
.srv-act{flex:0 0 auto;display:flex;gap:8px;align-items:center}
@media (max-width:640px){
  .srv-row{flex-direction:column;align-items:stretch}
  .srv-act{justify-content:flex-end}
}

/* ── server.php 概览：两列等高、底部对齐 ── */
.uc-stack{display:flex;flex-direction:column;gap:16px;height:100%}
.uc-stack .uc-card{margin-bottom:0}
.uc-grow{flex:1 1 auto}       /* 每列最后一张卡撑满，使两列底部对齐 */

/* ── 宽带图（Chart.js）── */
.traffic-wrap{width:100%;border:1px solid #eef0f3;border-radius:8px;overflow:hidden;background:#fbfcfe}
.traffic-svg{width:100%;height:auto;display:block}

/* 时间范围：开始日期 → 结束日期（datetimerange），像 DCIM 一样 */
.traffic-range{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.traffic-range input[type="datetime-local"]{border:1px solid #d7dbe0;border-radius:6px;padding:5px 8px;font-size:13px;color:#374151;background:#fff}
.traffic-range .sep{color:#9099a3}

/* 通用色点（统计表） */
.dot{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;vertical-align:middle}

/* 现在/平均/最大 */
.traffic-stats{border-collapse:collapse;margin:2px 0 12px;font-size:13px}
.traffic-stats th{color:#9099a3;font-weight:500;text-align:right;padding:2px 14px;font-size:12px}
.traffic-stats th:first-child{text-align:left}
.traffic-stats td{padding:2px 14px;text-align:right;font-variant-numeric:tabular-nums;color:#374151}
.traffic-stats td:first-child{text-align:left;color:#606266}

/* ============ DCIM 设置页 ============ */
.dl dd .muted { margin-left: 6px; }
.sw-list { display: flex; flex-direction: column; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.sw-row:last-child { border-bottom: none; }
.sw-row.sw-danger { background: #fffafa; }
.sw-text .badge { margin-left: 6px; vertical-align: 1px; }
.sw { position: relative; flex: none; width: 40px; height: 22px; }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.sw-track { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .15s; }
.sw-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(15,23,42,.3); transition: transform .15s; }
.sw input:checked + .sw-track { background: var(--primary); }
.sw-danger .sw input:checked + .sw-track { background: #dc2626; }
.sw input:checked + .sw-track::after { transform: translateX(18px); }
.sw input:focus-visible + .sw-track { outline: 2px solid var(--primary); outline-offset: 2px; }
.sw-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.log-filter { display: flex; align-items: center; gap: 8px; margin: 0; }
.log-filter select { width: auto; padding: 4px 8px; font-size: 13px; }
.log-table td, .kpi .num { font-variant-numeric: tabular-nums; }
.conn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .conn-grid { grid-template-columns: 1fr; } }
.conn-field { display: flex; flex-direction: column; gap: 6px; }
.conn-field .k { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.conn-field .hint { font-size: 12px; color: var(--muted); }
.conn-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.perm-set { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.perm-set .check { font-size: 13px; white-space: nowrap; }
.perm-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pager .psize { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0; }
.pager .psize select { width: auto; height: 32px; padding: 0 8px; font-size: 13px; }

/* ============ 后台表格统一样式（仅后台生效）============ */
.admin-body .table-wrap { -webkit-overflow-scrolling: touch; }
.admin-body .table-wrap > table { min-width: 680px; }        /* 窄屏横向滚动，不把列挤变形 */
.admin-body table { font-size: 13px; font-variant-numeric: tabular-nums; }
.admin-body th, .admin-body td { padding: 9px 12px; }
.admin-body th {
  text-transform: none; letter-spacing: 0; font-weight: 600; white-space: nowrap;
  background: #f8fafc; color: #475569; border-bottom: 1px solid #cbd5e1;
}
.admin-body tbody tr:last-child td { border-bottom: none; }
.admin-body tbody tr:hover { background: #f1f5f9; }
.admin-body td strong { font-weight: 600; }
.admin-body td .muted { line-height: 1.45; }
/* 操作列：按钮和内联表单横向排列、不换行 */
.admin-body td.right, .admin-body th.right { text-align: right; }
.admin-body td.right { white-space: nowrap; }
.admin-body td.right > form, .admin-body td.right > details, .admin-body td.right > a { display: inline-block; margin-left: 6px; vertical-align: middle; }
.admin-body td.right > :first-child { margin-left: 0; }
.admin-body td .btn-sm { padding: 4px 10px; font-size: 12px; }
/* 表内的小表单（角色、代理等级等）不撑高行 */
.admin-body td form select { padding: 4px 8px; font-size: 13px; }
/* 状态/金额等短内容不折行 */
.admin-body td .badge { white-space: nowrap; }
.admin-body td.mono, .admin-body td .mono { font-size: 12px; }
/* 日志表：说明列允许折行但限宽 */
.log-table td:nth-child(6) { max-width: 320px; word-break: break-all; }
.log-table td:nth-child(1), .log-table td:nth-child(7) { white-space: nowrap; }
/* 操作列里的弹窗不继承 nowrap / 右对齐 */
.admin-body td .dlg-body { white-space: normal; text-align: left; font-size: 14px; font-weight: 400; }

/* ============ 后台侧栏分组（系统配置）============ */
.admin-nav details.nav-grp > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500; }
.admin-nav details.nav-grp > summary::-webkit-details-marker { display: none; }
.admin-nav details.nav-grp > summary:hover { background: #f1f5f9; color: var(--fg); }
.admin-nav details.nav-grp > summary .caret { margin-left: auto; transition: transform .15s; }
.admin-nav details.nav-grp[open] > summary .caret { transform: rotate(90deg); }
.admin-nav .nav-kids { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px 14px; padding-left: 8px; border-left: 1px solid var(--border); }
@media (max-width: 760px) {
  .admin-nav details.nav-grp { flex-shrink: 0; }
  .admin-nav details.nav-grp[open] { display: flex; gap: 4px; align-items: center; }
  .admin-nav .nav-kids { flex-direction: row; margin: 0; padding: 0; border: none; gap: 4px; }
  .admin-nav details.nav-grp > summary { white-space: nowrap; padding: 8px 12px; }
}

/* ============ 前台页脚友情链接 ============ */
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding-top: 14px; padding-bottom: 6px; font-size: 13px; }
.foot-links .foot-links-title { color: var(--muted); font-weight: 600; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--primary); }

/* ============ 站务信息 ============ */
.logo-preview { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; height: 64px; padding: 8px 14px; background: #f1f5f9; border: 1px dashed var(--border); border-radius: 10px; }
.logo-preview img { max-height: 48px; max-width: 220px; }
.site-form-grid { display: grid; gap: 18px; max-width: 560px; }
.link-table input[type=text], .link-table input[type=number] { width: 100%; }
.link-table td { padding: 6px 8px; }
.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .img-grid { grid-template-columns: 1fr; } }

/* ============ 切换用户提示条 ============ */
.perm-set.perm-set-col { flex-direction: column; gap: 8px; }

/* ============ 后台用户详情 / 列表排序 ============ */
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { color: var(--primary); }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 0 0 20px; }
.tabs a { padding: 9px 16px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--fg); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.user-grid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .user-grid { grid-template-columns: 1fr; } }
.user-grid .section-title { margin: 0 0 10px; }
.user-grid > div > .stat-grid + .section-title { margin-top: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat-tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.stat-tile .label { font-size: 12px; color: var(--muted); }
.stat-tile .num { font-size: 24px; font-weight: 700; margin-top: 4px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-tile .foot { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat-tile.primary { background: var(--primary); border-color: var(--primary); }
.stat-tile.primary .label, .stat-tile.primary .num, .stat-tile.primary .foot { color: #fff; }
.stat-tile.warn .num { color: #b45309; }
.stat-tile.ok .num { color: #166534; }
.btn-balance { background: #fee2e2; color: #b91c1c; border-color: #fecaca; width: 100%; text-align: center; }
.btn-balance:hover { background: #fecaca; }
.stat-tile .foot details.dlg { display: block !important; }
/* 管理员「以该客户身份查看」期间，左下角回到管理员身份的小按钮 */
.imp-pill { position: fixed; left: 16px; bottom: 16px; z-index: 120; margin: 0; }
.imp-pill button { padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; background: #0f172a; color: #e2e8f0; font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: 0 8px 24px rgba(15, 23, 42, .35); opacity: .88; transition: opacity .15s, background .15s; }
.imp-pill button:hover { opacity: 1; background: #1e293b; }
