/* Buka Cloud —— 赛博朋克风格面板
   配色：碳黑底 1a1124 / 暗紫 140a1f / 霓虹青 #22d3ee / 霓虹粉 #ec4899 / 霓虹紫 #a855f7 */

* { box-sizing: border-box; }
:root {
  --bg-0: #0d0816;
  --bg-1: #140a1f;
  --bg-2: #1a1124;
  --bg-3: #22162e;
  --line: #2a1d3d;
  --txt: #d8cfe6;
  --muted: #8c7ea6;
  --cyan: #22d3ee;
  --pink: #ec4899;
  --purple: #a855f7;
  --yellow: #facc15;
  --green: #10b981;
  --red: #ef4444;
}

html, body {
  margin: 0; padding: 0; height: 100%;
  background: radial-gradient(ellipse at 80% -10%, rgba(168, 85, 247, .18), transparent 60%),
              radial-gradient(ellipse at -10% 80%, rgba(34, 211, 238, .15), transparent 55%),
              var(--bg-0);
  color: var(--txt);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }
/* 默认隐藏验证码字段，由 setMode() 在合适的模式（register / reset）下显示 */
.auth-code-field { display: none; }

/* —— 通用卡片 —— */
.card {
  background: linear-gradient(180deg, rgba(26,17,36,.9), rgba(20,10,31,.92));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  position: relative;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: 10px; pointer-events: none;
  background: linear-gradient(135deg, rgba(34,211,238,.12), transparent 40%, rgba(236,72,153,.1) 80%);
  mix-blend-mode: screen; opacity: .6;
}
.card > * { position: relative; z-index: 1; }
.card-title { font-size: 13px; color: var(--muted); margin: 0 0 12px; letter-spacing: .5px; }

/* —— 扫描线 —— */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9;
  background: repeating-linear-gradient(0deg,
    rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
}

/* —— 顶栏 —— */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(20,10,31,.6);
  backdrop-filter: blur(8px);
}
.topbar h1 { font-size: 18px; margin: 0; letter-spacing: 1px; }
.topbar h1::before {
  content: "▍"; color: var(--cyan); margin-right: 4px;
  text-shadow: 0 0 8px var(--cyan);
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-email { color: var(--muted); font-size: 13px; }

.main {
  width: 100%;
  max-width: 100%;
  padding: 28px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

#view {
  width: 100%;
  flex: 1;
}

/* —— 按钮 —— */
.btn-primary, .btn-ghost, .btn-action {
  border-radius: 6px; border: 1px solid var(--line);
  padding: 9px 18px; font-size: 13px; letter-spacing: .5px;
  transition: all .18s ease;
}
.btn-primary {
  background: linear-gradient(90deg, rgba(34,211,238,.15), rgba(168,85,247,.18));
  border-color: rgba(34,211,238,.45);
  color: #e0fbff;
  text-shadow: 0 0 6px rgba(34,211,238,.45);
  box-shadow: 0 0 18px rgba(34,211,238,.18) inset, 0 0 12px rgba(34,211,238,.25);
}
.btn-primary:hover { box-shadow: 0 0 18px rgba(34,211,238,.35) inset, 0 0 22px rgba(34,211,238,.35); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--txt); border-color: var(--cyan); box-shadow: 0 0 8px rgba(34,211,238,.25); }
.btn-ghost.sm { padding: 5px 12px; font-size: 12px; }
.btn-action {
  background: rgba(34,211,238,.07); border-color: rgba(34,211,238,.3); color: #d6f6fc;
  width: 100%; text-align: left; display: flex; align-items: center;
  justify-content: space-between;
}
.btn-action:hover { background: rgba(34,211,238,.15); box-shadow: 0 0 12px rgba(34,211,238,.35); }
.btn-action .arrow { color: var(--cyan); }

/* —— 通用布局 → 仪表盘网格 —— */
.grid { display: grid; gap: 18px; width: 100%; align-items: stretch; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* —— 订单统计栏 —— */
.orders-stats {
  display: flex;
  gap: 18px;
  width: 100%;
  margin-bottom: 18px;
}
.orders-stats > .card {
  flex: 1;
  min-width: 0;
}
@media (max-width: 900px) {
  .orders-stats { flex-direction: column; }
}

/* —— 通知横幅（公告第一行） —— */
.announcement {
  border-radius: 10px;
  border: 1px solid rgba(34,211,238,.35);
  background: linear-gradient(90deg, rgba(34,211,238,.12), rgba(168,85,247,.12));
  padding: 12px 18px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
  box-shadow: 0 0 18px rgba(34,211,238,.25);
}
.announcement .icon {
  color: var(--cyan); font-size: 18px;
  filter: drop-shadow(0 0 6px var(--cyan));
}
.announcement .title { font-weight: 600; }
.announcement .desc { color: var(--muted); margin-left: auto; font-size: 13px; }

/* —— 我的订阅 card —— */
.sub-overview {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 18px;
}
@media (max-width: 760px) { .sub-overview { grid-template-columns: 1fr; } }
.sub-card {
  border-radius: 10px; border: 1px solid var(--line);
  padding: 22px; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(34,211,238,.18), transparent 45%),
    radial-gradient(circle at 88% 80%, rgba(236,72,153,.16), transparent 50%),
    linear-gradient(180deg, #150c22, #10081c);
}
.sub-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(34,211,238,.22), transparent 30%, rgba(236,72,153,.18) 80%);
  mix-blend-mode: screen; opacity: .7;
}
.sub-card > * { position: relative; z-index: 1; }
.sub-name { font-size: 22px; font-weight: 600; letter-spacing: 1px;
  background: linear-gradient(90deg, #67e8f9, #ec4899);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 28px rgba(34,211,238,.18);
}
.sub-id { color: var(--muted); font-size: 12px; margin-top: 4px; letter-spacing: 2px; }
.sub-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.sub-key .label { color: var(--muted); font-size: 12px; }
.sub-key .value { font-size: 15px; font-weight: 600; }
.sub-key .value.cyan { color: var(--cyan); text-shadow: 0 0 6px rgba(34,211,238,.3); }
.sub-key .value.pink { color: var(--pink); text-shadow: 0 0 6px rgba(236,72,153,.3); }
.sub-status { margin-top: 18px; display: flex; justify-content: space-between; align-items: flex-end; }
.sub-status .expired { color: var(--muted); }
.sub-status .state { font-size: 13px; color: var(--green); text-shadow: 0 0 6px rgba(16,185,129,.4); padding-left: 8px; }

/* 流量环 */
.traffic-ring {
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.ring-wrap { position: relative; width: 130px; height: 130px; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fg { fill: none; stroke: url(#ringgrad); stroke-width: 10;
  stroke-linecap: round; transition: stroke-dashoffset 1s ease; filter: drop-shadow(0 0 6px var(--cyan)); }
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-center .num { font-size: 22px; font-weight: 700; color: var(--cyan);
  text-shadow: 0 0 8px rgba(34,211,238,.4); }
.ring-center .unit { color: var(--muted); font-size: 12px; }

/* —— 快捷操作组 —— */
.quick-actions .actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

/* —— 公告列表、FAQ、教程 —— */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.list li:last-child { border-bottom: none; }
.list .meta { color: var(--muted); font-size: 12px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; letter-spacing: .5px; margin-right: 6px;
}
.badge-warn { background: rgba(250,204,21,.18); color: var(--yellow); border: 1px solid rgba(250,204,21,.35); }
.badge-info { background: rgba(34,211,238,.14); color: var(--cyan); border: 1px solid rgba(34,211,238,.35); }
.badge-cat { background: rgba(168,85,247,.16); color: var(--purple); border: 1px solid rgba(168,85,247,.35); }

/* —— FAQ 折叠 —— */
.faq-item { border-bottom: 1px dashed var(--line); }
.faq-q {
  padding: 12px 0; cursor: pointer; display: flex; justify-content: space-between;
  color: var(--txt);
}
.faq-q:hover { color: var(--cyan); }
.faq-q .caret { color: var(--muted); transition: transform .2s; }
.faq-item.open .faq-q .caret { transform: rotate(180deg); color: var(--cyan); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; color: var(--muted); }
.faq-item.open .faq-a { max-height: 160px; padding-bottom: 12px; }

/* —— 侧栏 —— */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); height: 100vh; width: 100%; min-width: 100%; }
.sidebar {
  width: 240px; padding: 24px 0;
  background: linear-gradient(180deg, #0d0616, #0a0512);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.sidebar::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--cyan), transparent);
  filter: blur(.3px); opacity: .6;
}
.brand { font-size: 18px; font-weight: 700; padding: 0 24px 24px;
  background: linear-gradient(90deg, #fff, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: 2px;
}
.brand-lg { font-size: 32px; font-weight: 800; letter-spacing: 3px; text-align: center;
  background: linear-gradient(90deg, #fff, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand span, .brand-lg span {
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-group { font-size: 11px; color: var(--muted); padding: 14px 24px 6px; letter-spacing: 2px; text-transform: uppercase; }
.sidebar nav a {
  display: block; padding: 9px 24px; margin: 0 10px; border-radius: 6px;
  color: var(--muted); font-size: 13px; position: relative;
  transition: all .18s;
}
.sidebar nav a:hover { color: var(--txt); background: rgba(34,211,238,.06); }
.sidebar nav a.active {
  color: #e0fbff; background: rgba(34,211,238,.1);
  box-shadow: inset 2px 0 0 var(--cyan), 0 0 12px rgba(34,211,238,.25);
}
.nav-tickets { display: flex; align-items: center; justify-content: space-between; }
.nav-badge {
  background: var(--pink); color: #fff; font-size: 10px;
  padding: 2px 6px; border-radius: 9px;
  box-shadow: 0 0 10px var(--pink);
}
.nav-icon {
  display: inline-block; width: 18px; text-align: center; margin-right: 6px;
  opacity: .85; filter: saturate(.7);
}

/* 顶栏图标按钮 */
.icon-btn {
  width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--line);
  background: rgba(13,8,22,.6); color: var(--muted); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: all .18s;
}
.icon-btn:hover { color: var(--cyan); border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(34,211,238,.3); }
.icon-dot {
  position: absolute; top: -2px; right: -2px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--pink);
  box-shadow: 0 0 6px var(--pink);
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-mask {
  position: absolute; inset: 0; background: rgba(5,2,12,.7); backdrop-filter: blur(2px);
}
.modal-card {
  position: relative; z-index: 1; width: 480px; max-width: 94vw;
  background: linear-gradient(180deg, #140b22, #0d0618);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 28px rgba(34,211,238,.18);
}
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; letter-spacing: 1px;
}
.modal-body { padding: 20px; }
.modal-close { padding: 2px 8px; }

/* 邀请页 */
.invite-stat { text-align: center; padding: 14px 0; }
.invite-stat .big { font-size: 30px; font-weight: 700;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* —— 认证卡片 —— */
.auth {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(34,211,238,.18), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(236,72,153,.16), transparent 50%),
    var(--bg-0);
}
.auth-card {
  background: rgba(20,10,31,.75);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px;
  width: 420px; max-width: 92vw;
  position: relative;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 40px rgba(34,211,238,.18);
}
.auth-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 14px; pointer-events: none;
  background: linear-gradient(135deg, rgba(34,211,238,.15), transparent 40%, rgba(236,72,153,.12) 85%);
  mix-blend-mode: screen;
}
.auth-card > * { position: relative; z-index: 1; }
.tabs {
  display: flex; gap: 4px; margin: 22px 0 18px;
  border-bottom: 1px solid var(--line);
}
.tab {
  flex: 1; background: transparent; border: none;
  color: var(--muted); padding: 9px 0; border-bottom: 2px solid transparent;
  transition: all .2s;
}
.tab.is-active { color: #e0fbff; border-bottom-color: var(--cyan);
  text-shadow: 0 0 6px rgba(34,211,238,.4);
}
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input {
  width: 100%; background: rgba(13,8,22,.8);
  border: 1px solid var(--line); color: var(--txt);
  padding: 10px 12px; border-radius: 6px; font-size: 14px;
  transition: all .2s;
}
.field input:focus { outline: none; border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(34,211,238,.35);
}
.field.row-code .row { display: flex; gap: 8px; align-items: stretch; }
.field.row-code input { flex: 1; }
.field.row-code button { white-space: nowrap; flex-shrink: 0; }
.field.row-code .row input:focus { outline: none; border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(34,211,238,.35); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }
.msg { min-height: 20px; font-size: 12px; margin: 6px 0 14px; }
.msg.err { color: var(--red); text-shadow: 0 0 4px rgba(239,68,68,.4); }
.msg.ok { color: var(--green); text-shadow: 0 0 4px rgba(16,185,129,.4); }
.auth-foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 16px; }

/* —— 套餐 card —— */
.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; width: 100%;
}
@media (min-width: 1100px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1400px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }
.plan-card {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 18px;
  background: linear-gradient(180deg, #160c26, #0f081a);
  transition: all .2s;
  position: relative; overflow: hidden;
  display: flex;
  flex-direction: column;
}
.plan-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(34,211,238,.35);
  transform: translateY(-3px);
}
.plan-card.popular {
  border-color: var(--pink);
  box-shadow: 0 0 26px rgba(236,72,153,.3);
  background: linear-gradient(180deg, #1a0b25, #10081c);
}
.plan-card.popular::before {
  content: "推荐"; position: absolute; top: 14px; right: -24px;
  background: var(--pink); color: #fff; font-size: 10px; letter-spacing: 2px;
  padding: 2px 28px; transform: rotate(45deg);
  box-shadow: 0 0 10px var(--pink); z-index: 2;
}
.plan-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.plan-price { font-size: 28px; font-weight: 700; margin: 10px 0 4px;
  background: linear-gradient(90deg,#22d3ee,#67e8f9);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 12px rgba(34,211,238,.4);
}
.plan-price small { font-size: 12px; color: var(--muted); font-weight: 400;
  -webkit-text-fill-color: var(--muted); }
.protocol-chips { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.protocol-chip {
  background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.3);
  color: #22d3ee; font-size: 11px; padding: 2px 8px; border-radius: 4px;
  letter-spacing: .5px;
}
.protocol-chip.secure { background: rgba(168,85,247,.1); border-color: rgba(168,85,247,.3); color: #a855f7; }
.plan-specs { list-style: none; padding: 0; margin: 12px 0; color: var(--muted); font-size: 13px; flex: 1; }
.plan-specs li { padding: 3px 0; line-height: 1.6; }
.plan-specs li.ok { color: #a7f3d0; }
.plan-specs li.no { color: #fca5a5; }
.plan-divider { height: 1px; background: var(--line); margin: 12px 0; opacity: .5; }
.plan-buy-bar { display: flex; gap: 8px; margin-top: auto; }
.plan-buy-bar button { flex: 1; }
.plan-total { font-size: 12px; color: var(--muted); text-align: right; margin-top: 6px; }
.plan-total b { color: #22d3ee; font-size: 14px; }
.order-success-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px dashed var(--line); font-size: 13px; }
.order-success-row:last-child { border-bottom: none; }
.modal-lg .modal-card { max-width: 600px; }

/* —— 订单表格 —— */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 8px; text-align: left; border-bottom: 1px dashed var(--line); }
.table th { color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.pill { padding: 2px 10px; border-radius: 9px; font-size: 11px;
  border: 1px solid var(--line);
}
.pill-pending { background: rgba(250,204,21,.12); color: var(--yellow); border-color: rgba(250,204,21,.3); }
.pill-paid    { background: rgba(16,185,129,.12); color: var(--green); border-color: rgba(16,185,129,.3); }
.pill-cancelled { background: rgba(239,68,68,.1); color: var(--red); border-color: rgba(239,68,68,.3); }

/* —— 节点状态 —— */
.node-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; width: 100%;
}
.node {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  background: rgba(13,8,22,.5); display: flex; justify-content: space-between; align-items: center;
}
.node .name { font-weight: 600; font-size: 13px; }
.node .reg { color: var(--muted); font-size: 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green); margin-right: 6px;
}
.dot.off { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* —— Toast —— */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(34,211,238,.15); border: 1px solid rgba(34,211,238,.5);
  color: #e0fbff; padding: 11px 22px; border-radius: 9px;
  font-size: 13px; letter-spacing: .5px;
  box-shadow: 0 0 22px rgba(34,211,238,.4);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* —— 个人中心字段 —— */
.profile-rows .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.profile-rows .row:last-child { border-bottom: none; }
.mono { font-family: "Consolas", "Menlo", monospace; color: var(--cyan); }

/* —— 购买订阅 —— */
.months { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.months button.month-pill {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--line);
  color: var(--txt);
  padding: 7px 14px;
  border-radius: 8px;
  background-color: rgba(255,255,255,.03);
  background-image: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
  outline: none;
  transition: all .2s ease;
}
.months button.month-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(34,211,238,.35);
}
.months button.month-pill.m-1 {
  background-color: rgba(34,211,238,.14);
  background-image: linear-gradient(180deg, rgba(34,211,238,.16), rgba(34,211,238,.07));
  border-color: rgba(34,211,238,.28);
}
.months button.month-pill.m-3 {
  background-color: rgba(250,204,21,.14);
  background-image: linear-gradient(180deg, rgba(250,204,21,.16), rgba(250,204,21,.07));
  border-color: rgba(250,204,21,.28);
}
.months button.month-pill.m-6 {
  background-color: rgba(168,85,247,.14);
  background-image: linear-gradient(180deg, rgba(168,85,247,.16), rgba(168,85,247,.07));
  border-color: rgba(168,85,247,.28);
}
.months button.month-pill.m-12 {
  background-color: rgba(236,72,153,.16);
  background-image: linear-gradient(180deg, rgba(236,72,153,.18), rgba(236,72,153,.08));
  border-color: rgba(236,72,153,.28);
}
.months button.month-pill small {
  font-weight: 700;
  letter-spacing: .2px;
}
.months button.month-pill.active {
  color: #fff;
  border-color: currentColor;
  box-shadow: 0 0 14px rgba(34,211,238,.16), inset 0 0 0 1px rgba(255,255,255,.06);
}
.months button.month-pill.m-1.active {
  background-color: rgba(34,211,238,.26);
  background-image: linear-gradient(180deg, rgba(34,211,238,.28), rgba(34,211,238,.13));
  color: #dffcff;
  box-shadow: 0 0 14px rgba(34,211,238,.32);
}
.months button.month-pill.m-3.active {
  background-color: rgba(250,204,21,.24);
  background-image: linear-gradient(180deg, rgba(250,204,21,.26), rgba(250,204,21,.13));
  color: #fff7d1;
  box-shadow: 0 0 14px rgba(250,204,21,.22);
}
.months button.month-pill.m-6.active {
  background-color: rgba(168,85,247,.24);
  background-image: linear-gradient(180deg, rgba(168,85,247,.26), rgba(168,85,247,.13));
  color: #f0d9ff;
  box-shadow: 0 0 14px rgba(168,85,247,.24);
}
.months button.month-pill.m-12.active {
  background-color: rgba(236,72,153,.26);
  background-image: linear-gradient(180deg, rgba(236,72,153,.28), rgba(236,72,153,.13));
  color: #ffe0ef;
  box-shadow: 0 0 14px rgba(236,72,153,.28);
}

/* —— 邀请页 —— */
.invite-stat { text-align: center; padding: 14px 0; }
.invite-stat .big { font-size: 30px; font-weight: 700;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* —— 标题呼号 —— */
h2.page-hd {
  font-size: 18px; margin: 0 0 18px; letter-spacing: 1px;
  color: var(--txt);
}
h2.page-hd::before {
  content: "▍"; color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan); margin-right: 4px;
}

.empty-tip { color: var(--muted); text-align: center; padding: 28px 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, Menlo, monospace; }

/* profile 开关 */
.switch {
  position: relative; display: inline-block; width: 42px; height: 22px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 22px; transition: .25s;
}
.slider::before {
  content: ""; position: absolute; height: 16px; width: 16px;
  left: 2px; top: 2px; background: var(--muted);
  border-radius: 50%; transition: .25s;
}
.switch input:checked + .slider {
  background: rgba(34, 211, 238, .25);
  border-color: rgba(34, 211, 238, .6);
  box-shadow: 0 0 8px rgba(34,211,238,.4);
}
.switch input:checked + .slider::before {
  transform: translateX(20px);
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

/* 套餐 filter tabs */
.filter-tabs { display: flex; gap: 4px; }
.filter-tabs .active-on {
  color: #e0fbff; border-color: var(--cyan);
  background: rgba(34,211,238,.15);
  box-shadow: 0 0 8px rgba(34,211,238,.3);
}

/* 流量明细统计卡 */
.stat-mini { display: flex; align-items: center; gap: 12px; }
.stat-mini .muted { font-size: 12px; letter-spacing: .5px; }
.stat-mini > div:last-child { margin-top: 0; min-width: 0; }
.stat-mini > div:last-child.text-right { text-align: right; }

/* row-code as simple flex row used in TG form */
form.row-code { display: flex; gap: 10px; background: transparent; border: 0; padding: 0; margin: 12px 0 0; }
form.row-code input { flex: 1; background: rgba(13,8,22,.8); border: 1px solid var(--line); color: var(--txt);
  padding: 9px 12px; border-radius: 6px; }
form.row-code input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 10px rgba(34,211,238,.3); }
form.row-code button { white-space: nowrap; }

/* textarea */
textarea { font: inherit; }
textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 10px rgba(34,211,238,.3); }

/* ── 订阅管理 —— VLESS 链接 + 二维码 ── */
.vless-textarea {
  width: 100%;
  min-height: 90px;
  background: rgba(13,8,22,.8);
  border: 1px solid var(--line);
  color: #67e8f9;
  padding: 12px;
  border-radius: 6px;
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
  word-break: break-all;
}
.vless-textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 12px rgba(34,211,238,.35); }
.vless-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.qr-area { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.qr-wrap {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(34,211,238,.25);
}
.qr-wrap img, .qr-wrap canvas { display: block; }

/* 进度条 */
.progress-bar { width: 100%; height: 8px; background: var(--bg-3); border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 6px; transition: width .6s ease; }

/* 订阅管理 KV 行 */
.row-kv {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.row-kv:last-child { border-bottom: none; }
.row-kv > span:first-child { color: var(--muted); }

/* —— 个人中心重排 —— */
.profile-top {
  align-items: stretch;
}
.profile-wallet {
  min-height: 100%;
}
.wallet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.wallet-head .btn-primary {
  flex-shrink: 0;
  margin-top: 6px;
}
.profile-form {
  display: grid;
  gap: 12px;
}
.profile-mid {
  align-items: stretch;
}
.profile-tg-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.profile-tg-form input {
  flex: 1;
}
.profile-account {
  padding-bottom: 16px;
}
.account-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.account-badge {
  font-size: 11px;
  color: #dffcff;
  background: rgba(34,211,238,.1);
  border: 1px solid rgba(34,211,238,.24);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}
.account-grid .row-kv {
  padding: 10px 0;
}
.account-value.cyan {
  color: var(--cyan);
}
.account-link {
  margin-top: 8px;
  padding-top: 12px;
}
.account-url {
  display: inline-block;
  max-width: min(100%, 560px);
  vertical-align: middle;
}
@media (max-width: 900px) {
  .wallet-head,
  .account-head,
  .profile-tg-form {
    flex-direction: column;
    align-items: stretch;
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
}

/* 服务器信息卡片 */
.server-info {
  background: rgba(13,8,22,.4);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

/* —— 管理后台 3x-ui 入站 —— */
.xui-inbound-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.xui-inbound-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(26,17,36,.88), rgba(20,10,31,.92));
  padding: 14px;
}
.xui-inbound-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}
.xui-kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(42,29,61,.7);
  font-size: 12px;
}
.xui-kv:last-child {
  border-bottom: none;
}
.xui-kv > span:first-child {
  color: var(--muted);
}
.xui-warning {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(250,204,21,.28);
  background: rgba(250,204,21,.08);
  color: #fff1b8;
  font-size: 12px;
}
/* —— 管理后台用户详情弹窗 —— */
.admin-user-modal {
  width: min(1080px, 95vw);
  max-width: min(1080px, 95vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
#admin-user-detail .modal-body {
  overflow: auto;
  max-height: calc(90vh - 68px);
}
.detail-grid {
  gap: 10px 14px;
}
.detail-grid .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(42,29,61,.8);
}
.detail-grid .row > span:last-child {
  text-align: right;
}
.admin-inbound-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.admin-inbound-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(42,29,61,.9);
  border-radius: 8px;
  padding: 12px 10px;
  background: rgba(13,8,22,.36);
}
.admin-inbound-item:hover {
  border-color: rgba(34,211,238,.35);
}
.admin-inbound-item input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #22d3ee;
}
.admin-inbound-main {
  display: block;
  color: #dffcff;
  font-weight: 600;
}
.admin-inbound-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 900px) {
  .xui-inbound-list,
  .xui-inbound-meta,
  .admin-inbound-grid {
    grid-template-columns: 1fr;
  }
}
