/* regalcdn 用户中心（自适应品牌，站长可在后台自定义名称/Logo） */
:root {
  --brand: #2d8cf0;
  --brand-deep: #1f6fd0;
  --active-soft: #eaf3fe;
  --bg: #f5f7fa;
  --card: #ffffff;
  --line: #e8eaed;
  --title: #17233d;
  --sub: #515a6e;
  --muted: #9aa1ab;
  --ok: #19be6b;
  --err: #ed4014;
  --warn: #ff9900;
}
html.dark {
  --bg: #10151f; --card: #1a2233; --line: #2a3448;
  --title: #e5eaf2; --sub: #a8b3c5; --muted: #6b7690;
  --active-soft: #1d2f4a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--sub); font-size: 14px; }
a { color: var(--brand); text-decoration: none; }
code { font-family: Menlo, Consolas, monospace; background: var(--bg); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; color: var(--brand-deep); }

/* ---- 布局 ---- */
.layout { display: flex; min-height: 100vh; }
.side { flex: 0 0 190px; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side.fold { display: none; }
.logo { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; }
.logo b { display: block; font-size: 17px; color: var(--brand); letter-spacing: .5px; }
.logo small { color: var(--muted); font-size: 11px; }
#nav { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
#nav .g { color: var(--muted); font-size: 12px; padding: 12px 8px 4px; }
#nav a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 6px; color: var(--sub); font-size: 13.5px; margin-bottom: 2px; cursor: pointer; }
#nav a .i { width: 16px; text-align: center; opacity: .75; }
#nav a:hover { background: var(--bg); }
#nav a.on { background: var(--active-soft); color: var(--brand); font-weight: 600; }
#nav a.sub { padding-left: 36px; font-size: 13px; }
#nav a .arrow { margin-left: auto; font-size: 10px; color: var(--muted); }
.side-foot { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.side-foot a { color: var(--muted); font-size: 12.5px; }
.side-foot a:hover { color: var(--brand); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 10px; background: var(--card); border-bottom: 1px solid var(--line); padding: 0 18px; height: 56px; position: sticky; top: 0; z-index: 5; }
.t-btn { border: none; background: none; font-size: 15px; color: var(--sub); cursor: pointer; padding: 6px; border-radius: 6px; }
.t-btn:hover { background: var(--bg); }
.crumb { font-size: 15px; font-weight: 600; color: var(--title); margin-left: 4px; }
.spacer { flex: 1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.content { padding: 18px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* ---- 卡片 ---- */
.card { background: var(--card); border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.04); margin-bottom: 16px; }
.card-pad { padding: 18px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px; }
.panel-head h3 { font-size: 14.5px; font-weight: 600; color: var(--title); display: flex; align-items: center; gap: 8px; }
.ph-icon { font-size: 15px; }
.panel-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sub-line { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ---- 标签 ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.tab { padding: 6px 14px; border-radius: 4px; border: 1px solid transparent; font-size: 13px; color: var(--sub); cursor: pointer; user-select: none; }
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); background: var(--active-soft); border-color: #b5d6f7; }
.tab.sm { padding: 4px 12px; font-size: 12.5px; }

/* ---- 按钮 / 表单 ---- */
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 16px; border-radius: 5px; border: 1px solid var(--line); background: var(--card); color: var(--sub); font-size: 13px; cursor: pointer; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-deep); color: #fff; }
.btn.sm { padding: 4px 12px; font-size: 12.5px; }
.btn.danger { color: var(--err); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { border: 1px solid var(--line); border-radius: 5px; padding: 7px 10px; font-size: 13px; color: var(--title); background: var(--card); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
input::placeholder { color: var(--muted); }
.ctl { min-height: 34px; }
.form-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row > label { flex: 0 0 110px; text-align: right; color: var(--sub); font-size: 13px; }

/* ---- 表格 ---- */
.tbl-wrap { overflow-x: auto; padding: 0 4px 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--sub); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--bg); }
.tbl td b { color: var(--title); font-weight: 600; }
.tbl .num { font-family: Menlo, Consolas, monospace; }
.tbl-empty { text-align: center; padding: 34px 0 !important; color: var(--muted); }
.tbl-wrap > .sort { cursor: pointer; user-select: none; }
.site-link { font-weight: 600; }

/* ---- 状态 ---- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-size: 12px; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: #e7f9ef; color: var(--ok); }
.pill.warn { background: #fff6e6; color: var(--warn); }
.pill.err { background: #fdecec; color: var(--err); }
.pill.info { background: var(--active-soft); color: var(--brand); }
.pill.plain { background: var(--bg); color: var(--muted); }
html.dark .pill.ok { background: #113324; } html.dark .pill.warn { background: #3a2a10; } html.dark .pill.err { background: #3a1414; } html.dark .pill.info { background: #14273c; }
.st-run { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: 13px; }
.st-run::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.st-run.err { color: var(--err); } .st-run.err::before { background: var(--err); }
.st-run.warn { color: var(--warn); } .st-run.warn::before { background: var(--warn); }

/* ---- 分页 ---- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 12px 16px; flex-wrap: wrap; }
.pager .pg { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px; cursor: pointer; padding: 0 6px; color: var(--sub); background: var(--card); }
.pager .pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager select { font-size: 12.5px; padding: 3px 6px; }
.pager .info { color: var(--muted); font-size: 12.5px; margin-right: 6px; }

/* ---- KPI ---- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 4px 18px 16px; }
.stat { background: var(--bg); border-radius: 6px; padding: 12px 14px; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat b { display: block; margin-top: 6px; font-size: 22px; color: var(--title); font-weight: 600; }
.stat b small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--card); border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); border-top: 3px solid var(--brand); }
.kpi.green { border-color: var(--ok); } .kpi.orange { border-color: var(--warn); } .kpi.purple { border-color: #7c5cfa; }
.kpi span { color: var(--muted); font-size: 12.5px; }
.kpi b { display: block; font-size: 24px; color: var(--title); margin-top: 6px; }
.kpi b small { font-size: 12px; color: var(--muted); font-weight: 400; }
.kpi i { display: block; font-style: normal; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---- 首页 ---- */
.home-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.welcome { display: flex; gap: 14px; padding: 20px; }
.welcome .avatar { width: 52px; height: 52px; font-size: 24px; }
.w-name { font-size: 17px; font-weight: 700; color: var(--title); display: flex; align-items: center; gap: 10px; }
.w-greet { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.w-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.w-tag { background: var(--bg); border-radius: 5px; padding: 5px 12px; font-size: 12.5px; color: var(--sub); }
.w-tag b { color: var(--title); font-weight: 600; }
.chart-box { padding: 4px 10px 12px; }
canvas.chart { width: 100%; display: block; }
.top-list { padding: 2px 18px 14px; }
.top-row { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.top-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--title); font-weight: 500; }
.top-row span { color: var(--muted); margin-left: 14px; font-size: 12.5px; }
.anno-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.anno-item span { color: var(--muted); font-size: 12px; }
.anno-item a { color: var(--err); }
.pkg-row { padding: 10px 18px 4px; }
.pkg-row b { font-size: 13px; color: var(--title); font-weight: 500; }
.prog-wrap { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; }
.prog { flex: 1; height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.pct { font-size: 12px; color: var(--muted); min-width: 34px; text-align: right; }
.use-table { width: 100%; border-collapse: collapse; }
.use-table td { padding: 9px 18px; font-size: 13px; border-top: 1px dashed var(--line); }
.use-table td:first-child { color: var(--muted); }
.use-table td:last-child { text-align: right; color: var(--title); font-weight: 600; }

/* ---- 网站编辑 ---- */
.sed-card { padding: 0; }
.sed-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px 8px; }
.sed-head h2 { font-size: 20px; font-weight: 600; color: var(--title); }
.sed-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 24px 0; }
.sed-tab { padding: 6px 16px; border-radius: 4px; font-size: 13px; color: var(--sub); cursor: pointer; user-select: none; }
.sed-tab:hover { color: var(--brand); }
.sed-tab.active { background: var(--active-soft); color: var(--brand); }
.sed-body { padding: 2px 24px 28px; }
.sec-title { display: flex; align-items: center; gap: 10px; padding: 18px 0 10px; font-size: 14px; font-weight: 600; color: var(--title); }
.sec-title .cnt { font-size: 12px; font-weight: 400; color: var(--muted); }
.sec-sum { font-size: 12px; font-weight: 400; color: var(--muted); }
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 56px; }
.cfg { font-size: 13px; padding: 7px 0; }
.cfg > label { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 5px; }
.cfg > div { color: var(--title); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cfg.full { grid-column: 1 / -1; }
.q-i { font-style: normal; display: inline-flex; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); color: #fff; align-items: center; justify-content: center; font-size: 10px; margin-left: 4px; cursor: help; }
.dom-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dtag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 4px; background: var(--active-soft); color: var(--brand); font-size: 13px; }
.dtag .x { font-size: 11px; cursor: pointer; opacity: .7; }
.dtag .x:hover { opacity: 1; color: var(--err); }
.item-help { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.acc-card { background: var(--bg); border-radius: 8px; padding: 14px 16px; }
.ac-head { display: flex; align-items: center; justify-content: space-between; }
.ac-head b { font-size: 14px; color: var(--title); }
.ac-desc { color: var(--muted); font-size: 12.5px; margin: 12px 0 2px; }
.ac-field { margin-top: 10px; }
.ac-label { font-size: 12.5px; color: var(--sub); margin-bottom: 8px; }
.ac-count { color: var(--muted); font-size: 12px; margin-top: 8px; }
.ptag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 4px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; color: var(--title); }
.ptag .x { cursor: pointer; color: var(--muted); }
.ptag .x:hover { color: var(--err); }
.origin-list { display: flex; flex-direction: column; gap: 8px; }
.origin-row { display: flex; align-items: center; gap: 16px; background: var(--bg); border-radius: 6px; padding: 10px 14px; font-size: 13px; }
.origin-row .onum { color: var(--brand); font-weight: 600; }
.origin-row .oip { color: var(--title); }
.origin-row .ow { color: var(--muted); }
.origin-row .ow b { color: var(--title); }
.origin-row .o-ops { margin-left: auto; display: flex; gap: 12px; }
.row-actions { display: flex; gap: 10px; margin: 4px 0 8px; }
.fld { margin: 10px 0; }
.fld-label { font-size: 13px; color: var(--sub); margin-bottom: 8px; font-weight: 500; }
.fld.inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fld.inline .fld-label { margin: 0; }
.chip-radios { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-radio { padding: 5px 14px; border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px; cursor: pointer; color: var(--sub); }
.chip-radio.on { border-color: var(--brand); color: var(--brand); background: var(--active-soft); }
.choice-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.choice-card { border: 1.5px solid var(--line); border-radius: 8px; padding: 14px; text-align: center; cursor: pointer; }
.choice-card b { display: block; color: var(--title); font-size: 14px; margin-bottom: 4px; }
.choice-card small { color: var(--muted); font-size: 12px; }
.choice-card.on { border-color: var(--brand); background: var(--active-soft); }
.choice-card.on b { color: var(--brand); }
.ivu-switch { display: inline-flex; width: 40px; height: 22px; border-radius: 99px; background: #c8ccd4; position: relative; cursor: pointer; transition: background .2s; vertical-align: middle; }
.ivu-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ivu-switch-checked { background: var(--brand); }
.ivu-switch-checked::after { left: 20px; }
.switch { display: inline-flex; width: 40px; height: 22px; border-radius: 99px; background: #c8ccd4; border: none; position: relative; cursor: pointer; transition: background .2s; vertical-align: middle; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch.on { background: var(--brand); }
.switch.on::after { left: 20px; }

/* ---- 消息订阅列表 ---- */
.sub-list { margin-top: 8px; }
.sub-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.sub-row:last-child { border-bottom: none; }
.sub-row.sub-head { padding: 10px 4px; }
.sub-row.sub-head .sub-txt span { font-size: 12px; color: var(--muted); }
.sub-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.sub-txt b { font-size: 14px; color: var(--title, #333); font-weight: 600; }
.sub-txt span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.sub-sw { display: grid; grid-template-columns: 72px 72px; justify-items: center; align-items: center; flex: none; }
.sub-sw span:not(.switch) { font-size: 12px; color: var(--muted); }
.sub-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); background: transparent; white-space: nowrap; }
.sub-row .switch { flex: none; }

/* ---- 弹窗 / 提示 ---- */
#mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: flex-start; justify-content: center; z-index: 100; padding-top: 12vh; }
#mask.show { display: flex; }
#modal { background: var(--card); border-radius: 8px; width: 480px; max-width: 92vw; max-height: 74vh; display: flex; flex-direction: column; overflow: hidden; }
.m-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-weight: 600; color: var(--title); border-bottom: 1px solid var(--line); }
.m-head span { cursor: pointer; color: var(--muted); font-size: 15px; }
.m-body { padding: 16px 18px; overflow-y: auto; }
.m-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
#toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); background: var(--title); color: #fff; padding: 9px 22px; border-radius: 6px; font-size: 13.5px; display: none; z-index: 200; }
#toast.ok { background: var(--ok); }
#toast.err { background: var(--err); }

/* ---- 登录 / 注册页 ---- */
.auth-scene { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 28px 20px; position: relative; overflow: hidden;
  background: radial-gradient(900px 520px at 8% 4%, rgba(45,140,240,.16), transparent 62%),
              radial-gradient(760px 520px at 94% 96%, rgba(94,106,210,.14), transparent 60%),
              linear-gradient(135deg, #f5f8fd 0%, #eaf1fa 48%, #f8fafd 100%); }
.auth-scene::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(rgba(45,140,240,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(45,140,240,.055) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 88%); mask-image: linear-gradient(to bottom, #000, transparent 88%); }
.auth-card { position: relative; display: flex; width: min(900px, 100%); min-height: 530px; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 24px 70px rgba(18,42,73,.14); }
.auth-brand { position: relative; width: 43%; padding: 42px 36px 30px; color: #fff; background: linear-gradient(158deg, #142e50 0%, #1a4474 52%, #155a8c 100%); display: flex; flex-direction: column; overflow: hidden; }
.auth-brand::before { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; right: 30px; top: -70px; border: 1px solid rgba(255,255,255,.15); }
.auth-brand::after { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; right: -120px; bottom: -120px; background: rgba(255,255,255,.07); }
.auth-logo { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; margin-bottom: 22px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.auth-logo .auth-ico { width: 30px; height: 30px; color: #fff; }
.auth-brand h1 { font-size: 26px; letter-spacing: 1px; }
.auth-line { width: 44px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.75); margin: 26px 0 22px; }
.auth-slogan { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.85); margin: -14px 0 18px; white-space: pre-wrap; position: relative; z-index: 1; }
.auth-brand-foot { margin-top: auto; display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: rgba(255,255,255,.62); position: relative; z-index: 1; }
.auth-panel { flex: 1; min-width: 0; padding: 40px 42px 30px; display: flex; flex-direction: column; }
.auth-panel-head h2 { font-size: 22px; color: var(--title); }
.auth-panel-head p { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.auth-tabs { display: flex; gap: 5px; background: var(--bg); border-radius: 9px; padding: 4px; margin: 22px 0 12px; }
.auth-tab { flex: 1; text-align: center; padding: 9px 0; border-radius: 7px; font-size: 13px; color: var(--sub); cursor: pointer; transition: .15s; user-select: none; }
.auth-tab:hover { color: var(--brand); }
.auth-tab.on { background: var(--card); color: var(--brand); font-weight: 600; box-shadow: 0 2px 8px rgba(20,60,120,.12); }
.auth-subtabs { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.auth-bind-label { font-size: 11.5px; color: var(--muted); margin-right: auto; white-space: nowrap; }
.auth-subtab { position: relative; padding: 8px 0 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.auth-subtab:hover { color: var(--brand); }
.auth-subtab.on { color: var(--brand); font-weight: 600; }
.auth-subtab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }
.auth-msg { background: rgba(237,64,20,.08); color: var(--err); font-size: 12.5px; padding: 8px 12px; border-radius: 7px; margin-bottom: 12px; }
.auth-row { margin-bottom: 13px; }
.auth-label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.auth-field { display: flex; align-items: center; gap: 9px; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); transition: .15s; }
.auth-field:focus-within { border-color: var(--brand); background: var(--card); box-shadow: 0 0 0 3px rgba(45,140,240,.12); }
.auth-ico { width: 17px; height: 17px; flex: none; color: var(--muted); }
.auth-field:focus-within .auth-ico { color: var(--brand); }
.auth-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--title); font-size: 13.5px; font-family: inherit; }
.auth-field input::placeholder { color: var(--muted); }
.auth-eye, .auth-code-btn { flex: none; border: 0; background: transparent; color: var(--brand); font-size: 12px; cursor: pointer; padding: 4px 2px; font-family: inherit; }
.auth-code-btn { border-left: 1px solid var(--line); padding-left: 11px; white-space: nowrap; }
.auth-code-btn:disabled { color: var(--muted); cursor: not-allowed; }
.auth-between { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 4px; font-size: 12.5px; }
.auth-check { display: flex; align-items: center; gap: 6px; color: var(--sub); cursor: pointer; }
.auth-between a { font-size: 12.5px; }
.auth-submit { width: 100%; height: 44px; margin-top: 16px; border: 0; border-radius: 9px; background: linear-gradient(90deg, #2d8cf0, #1f6fd0); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 4px; cursor: pointer; box-shadow: 0 8px 18px rgba(45,140,240,.28); transition: .15s; font-family: inherit; }
.auth-submit:hover { filter: brightness(1.07); transform: translateY(-1px); }
.auth-submit:active { transform: none; }
.auth-foot { margin-top: 16px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.9; }
.auth-foot a { margin: 0 2px; }
.auth-agr { margin-bottom: 4px; }
.auth-copyright { position: relative; color: #62738b; font-size: 11.5px; }
html.dark .auth-scene { background: radial-gradient(900px 520px at 8% 4%, rgba(45,140,240,.14), transparent 62%), radial-gradient(760px 520px at 94% 96%, rgba(94,106,210,.12), transparent 60%), linear-gradient(135deg, #0b1220 0%, #111c2e 55%, #0c1625 100%); }
html.dark .auth-scene::before { background-image: linear-gradient(rgba(150,185,235,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(150,185,235,.05) 1px, transparent 1px); }
html.dark .auth-card { background: #1a2233; border-color: #2a3448; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
html.dark .auth-brand { background: linear-gradient(158deg, #10243d 0%, #153456 52%, #12426a 100%); }
html.dark .auth-field { background: #121a29; }
html.dark .auth-tab.on { background: #242f45; }
html.dark .auth-copyright { color: #7f8ea6; }
@media (max-width: 760px) { .auth-card { flex-direction: column; min-height: 0; } .auth-brand { width: 100%; padding: 26px 24px; } .auth-brand-foot, .auth-line { display: none; } .auth-brand h1 { font-size: 21px; } .auth-logo { width: 44px; height: 44px; margin-bottom: 14px; } .auth-panel { padding: 28px 24px 26px; } }
.err404 { padding: 40px; text-align: center; }
.err404 .head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.copy-btn { display: inline-flex; align-items: center; padding: 2px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--brand); font-size: 12px; cursor: pointer; }
.copy-btn:hover { border-color: var(--brand); }
.err404 .path { border-top: 1px dashed var(--line); margin-top: 20px; padding-top: 14px; color: var(--muted); font-size: 12.5px; }

/* ---- 代理工作台（嵌入用户中心） ---- */
.rs-hero { background: linear-gradient(120deg, #1f6fd0, #2d8cf0); color: #fff; border-radius: 10px; padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.rs-hero h2 { font-size: 20px; font-weight: 700; }
.rs-hero .lv { display: inline-block; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); padding: 3px 12px; border-radius: 20px; font-size: 12.5px; margin-left: 10px; }
.rs-hero .sub { color: #d7e8fb; font-size: 12.5px; margin-top: 8px; }
.rs-stats { display: flex; flex-wrap: wrap; gap: 30px; }
.rs-stats > div { text-align: center; }
.rs-stats span { display: block; font-size: 12px; color: #cfe3fa; margin-bottom: 6px; }
.rs-stats b { font-size: 24px; font-weight: 700; }
.rs-progress { height: 9px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.rs-progress > i { display: block; height: 100%; background: linear-gradient(90deg, #2d8cf0, #7cc0ff); border-radius: 6px; }
.rs-method { font-weight: 700; font-size: 11px; padding: 2px 7px; border-radius: 4px; background: #eaf3fe; color: #1f6fd0; }
.rs-method.post { background: #e6f7ee; color: #1a9d5a; }
.rs-method.del { background: #fdece8; color: #ed4014; }
html.dark .rs-method { background: #1d2f4a; color: #7cc0ff; }

/* hidden 属性优先级修正 */
[hidden] { display: none !important; }

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .home-grid { grid-template-columns: 1fr; }
  .choice-cards { grid-template-columns: repeat(2, 1fr); }
}
/* 抽屉遮罩：全局默认隐藏，仅窄屏且 body.nav-open 时才由下方媒体查询打开 */
#navMask { display: none; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.42); }

/* ---- 窄屏 / 手机自适应：仅作用于 ≤760px，桌面端布局零改动 ---- */
@media (max-width: 760px) {
  /* 1) 侧栏改抽屉：默认移出屏幕，脚本给 body 加 .nav-open 才展开。
        原来只写 position:fixed 却不隐藏，190px 侧栏会永久盖住内容。 */
  .side { position: fixed; left: 0; top: 0; z-index: 60; width: 220px; height: 100vh;
          transform: translateX(-100%); transition: transform .22s ease;
          box-shadow: 2px 0 18px rgba(0,0,0,.16); }
  .side.fold { display: flex; }              /* 桌面上的折叠状态不带到手机 */
  body.nav-open .side { transform: translateX(0); }
  body.nav-open #navMask { display: block; }
  body.nav-open { overflow: hidden; }

  /* 2) 顶栏 / 内容区收紧留白，别让 18~24px 的内边距吃掉窄屏宽度 */
  .top { height: 52px; padding: 0 10px; gap: 6px; }
  .crumb { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .content { padding: 12px; }
  .card-pad { padding: 14px; }
  .panel-head { padding: 12px 14px 8px; }
  .panel-head .right { flex-wrap: wrap; }
  .stat-grid { padding: 2px 14px 12px; gap: 8px; }
  .kpi-grid { gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi b, .stat b { font-size: 20px; }
  .sed-head { padding: 16px 14px 6px; }
  .sed-head h2 { font-size: 18px; }
  .sed-tabs { padding: 6px 14px 0; gap: 6px; }
  .sed-body { padding: 2px 14px 22px; }
  .rs-stats { gap: 16px; }

  /* 3) 表单：标签独占一行左对齐，不再出现「右对齐标签 + 输入框被挤到下一行」 */
  .form-row { gap: 6px; }
  .form-row > label { flex: 1 1 100%; width: auto; text-align: left; font-size: 12.5px; }
  /* 内联写死的 width:320px / min-width:320px 兜底，绝不超出容器 */
  .content input, .content select, .content textarea,
  .content [style*="min-width"] { max-width: 100%; }

  /* 4) 网格单列 + 原本不换行的行容器允许换行 */
  .cfg-grid, .acc-grid { grid-template-columns: 1fr; gap: 4px 0; }
  .choice-cards { grid-template-columns: 1fr; }
  .origin-row, .anno-item, .m-foot, .panel-head .right { flex-wrap: wrap; }
  .origin-row .o-ops { margin-left: 0; }
  iframe { max-width: 100%; }

  /* 5) 弹窗接近满宽，按钮多时换行 */
  #mask { padding-top: 6vh; }
  #modal { width: 100%; max-width: 94vw; max-height: 86vh; }
  .m-head, .m-foot { padding: 12px 14px; }
  .m-body { padding: 14px; }

  /* 6) 表格横向滑动（.tbl-wrap 已有 overflow-x:auto），别把单元格压成竖排 */
  .tbl-wrap { -webkit-overflow-scrolling: touch; }
  .tbl th, .tbl td { padding: 9px 10px; }

  /* 7) 登录页：内容超高时从顶部排，不被垂直居中裁掉 */
  .auth-scene { justify-content: flex-start; overflow: visible; padding: 20px 14px 32px; }
  .auth-card { margin: auto 0; }
  .auth-panel { padding: 24px 18px 22px; }
  .auth-brand { padding: 22px 18px; }
  .auth-subtabs { gap: 12px; flex-wrap: wrap; }
  .auth-foot { line-height: 1.7; }
}
@media (max-width: 420px) {
  .kpi b, .stat b { font-size: 18px; }
  .tabs { gap: 6px; }
  .tab { padding: 6px 10px; font-size: 12.5px; }
  .sed-tab { padding: 6px 11px; }
}

/* 去掉点击/键盘焦点时的蓝色描边 */
a:focus, a:focus-visible, button:focus, button:focus-visible,
.btn:focus, .btn:focus-visible, .tab:focus, .sed-tab:focus,
.nav a:focus, .side a:focus { outline: none; }
