/* 用户中心 / 管理后台样式（依赖 site.css 的深色变量） */

body.portal .page { padding: 40px 0 72px; }
body.portal .page-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; }
body.portal .page-head h1 { font-size: clamp(24px, 3vw, 32px); }
body.portal .page-head p { margin-top: 8px; color: #9c9ca8; font-size: 14.5px; }
body.portal .page-head .actions { display: flex; flex-wrap: wrap; gap: 10px; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.tile span { display: block; color: var(--muted); font-size: 12.5px; letter-spacing: .02em; }
.tile strong { display: block; margin-top: 6px; font-size: 19px; font-weight: 620; letter-spacing: -.01em; }
.tile strong.small { font-size: 15px; font-weight: 560; }
.tile em { color: #ffb545; font-style: normal; }

.pcard { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.pcard + .pcard { margin-top: 16px; }
.pcard-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pcard-head h2 { font-size: 17px; font-weight: 600; }
.pcard-head p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 560; white-space: nowrap; }
.badge--ok { background: rgba(74, 222, 128, .14); color: #6ee7a0; border: 1px solid rgba(74, 222, 128, .28); }
.badge--warn { background: rgba(255, 181, 69, .14); color: #ffcf87; border: 1px solid rgba(255, 181, 69, .3); }
.badge--bad { background: rgba(248, 113, 113, .14); color: #fca5a5; border: 1px solid rgba(248, 113, 113, .3); }
.badge--muted { background: rgba(255, 255, 255, .07); color: #b9b9c4; border: 1px solid var(--line); }

label.field { display: grid; gap: 7px; font-size: 13.5px; color: #d7d7de; font-weight: 500; }
label.field .hint { color: var(--muted); font-size: 12px; font-weight: 400; }
.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: #f5f5f7;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.input, .select { height: 40px; }
.textarea { min-height: 90px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
.input::placeholder, .textarea::placeholder { color: #6f6f7b; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #ff8a3d; box-shadow: 0 0 0 3px rgba(255, 138, 61, .16); }
.select option { background: #14131a; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-stack { display: grid; gap: 14px; }
.check { display: flex; gap: 9px; align-items: center; color: #c9c9d3; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: #ff6a1a; }

.btn--sm { min-height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 9px; }
.btn--danger { border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .1); color: #fca5a5; }
.btn--danger:hover { background: rgba(248, 113, 113, .18); }

.task-list { display: grid; gap: 12px; }
.task-item { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .025); }
.task-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.task-top h3 { font-size: 15.5px; font-weight: 600; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.task-meta b { color: #d9d9e2; font-weight: 550; }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.msg-list { display: grid; gap: 8px; }
.msg-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.msg-row .select { height: 36px; font-size: 13px; }
.msg-row .input, .msg-row .textarea { min-height: 36px; padding: 7px 10px; }
.msg-row .textarea { min-height: 62px; }
.sticker-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.sticker-pick button { padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .04); color: #d4d4dd; font-size: 12.5px; cursor: pointer; }
.sticker-pick button:hover { border-color: rgba(255, 138, 61, .4); color: #ffcf87; }

table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { padding: 8px 10px; border-bottom: 1px solid var(--line); color: #8d8d99; font-weight: 550; text-align: left; white-space: nowrap; font-size: 12.5px; }
table.data td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, .055); color: #d3d3dc; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.mono, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
.scroll-x { overflow-x: auto; }

.empty { padding: 22px; border: 1px dashed rgba(255, 255, 255, .16); border-radius: 12px; color: var(--muted); font-size: 13.5px; text-align: center; }

dialog.sheet { width: min(100% - 32px, 720px); max-height: calc(100vh - 48px); padding: 0; border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; background: #100f16; color: #f5f5f7; }
dialog.sheet::backdrop { background: rgba(4, 3, 8, .72); backdrop-filter: blur(3px); }
.sheet-body { display: grid; gap: 16px; max-height: calc(100vh - 48px); overflow-y: auto; padding: 22px; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #100f16; }
.sheet-head h2 { font-size: 17px; }
.sheet-foot { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); background: #100f16; }
.icon-x { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: #c9c9d3; cursor: pointer; }

.toasts { position: fixed; z-index: 200; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(100% - 32px, 340px); }
.toast-item { padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; background: #16151c; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font-size: 13.5px; color: #ededf2; animation: toastIn .18s ease both; }
.toast-item.is-error { border-color: rgba(248, 113, 113, .4); color: #fca5a5; }
.toast-item.is-ok { border-color: rgba(74, 222, 128, .35); }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } }

.tabs-line { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs-line button { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #9c9ca8; font-size: 14px; cursor: pointer; }
.tabs-line button.is-active { border-bottom-color: #ff6a1a; color: #f5f5f7; }

.login-wrap { display: grid; min-height: calc(100vh - 64px); place-items: center; padding: 40px 20px; }
.login-card { width: min(100%, 420px); padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)); box-shadow: 0 40px 90px -60px rgba(255, 90, 31, .8); }
.login-card h1 { font-size: 22px; }
.login-card .sub { margin-top: 8px; color: var(--muted); font-size: 13.5px; }
.login-card form { display: grid; gap: 14px; margin-top: 22px; }
.login-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.login-switch button { padding: 9px; border: 0; border-radius: 9px; background: transparent; color: #a5a5b0; font-size: 14px; cursor: pointer; }
.login-switch button.is-active { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset; }
.form-error { min-height: 18px; margin: 0; color: #fca5a5; font-size: 13px; }

.note { padding: 12px 14px; border: 1px solid rgba(255, 181, 69, .26); border-radius: 11px; background: rgba(255, 181, 69, .07); color: #e6d3b3; font-size: 13px; line-height: 1.65; }
.note code { padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, .1); font-family: ui-monospace, Consolas, monospace; }

/* 导航里的账号信息：窄屏换行并隐藏邮箱，避免撑出横向滚动 */
.site-nav-actions { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.site-nav-actions .nav-email { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .site-nav { height: auto; min-height: var(--nav-h, 64px); flex-wrap: wrap; row-gap: 4px; padding-top: 6px; padding-bottom: 6px; }
  .site-nav-actions { width: 100%; margin-left: 0; gap: 6px; }
  .site-nav-actions .nav-email { display: none; }
}

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body.portal .page { padding: 24px 0 64px; }
  .tiles { grid-template-columns: 1fr; }
  .pcard { padding: 17px; }
  .form-row { grid-template-columns: 1fr; }
  .msg-row { grid-template-columns: 1fr; }
  .msg-row .select { width: 100%; }
  table.data th, table.data td { padding: 8px 6px; }
}

/* ==================== 用户中心（body.console）· 简洁版 ==================== */

body.console .page { padding: 32px 0 72px; }
body.console .site-nav-link.is-active { background: rgba(255, 255, 255, .08); opacity: 1; }

body.console .page-head { align-items: flex-start; gap: 14px 20px; margin-bottom: 22px; }
body.console .page-head h1 { font-size: 26px; letter-spacing: -.02em; }
body.console .page-head p { margin-top: 7px; color: #8d8d99; font-size: 14px; }

/* 概览：纯文字，无图标无渐变 */
body.console .tiles { gap: 12px; margin-bottom: 14px; }
body.console .tile { padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .03); }
body.console .tile-label { color: #8d8d99; font-size: 12px; letter-spacing: .01em; }
body.console .tile-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 5px; }
body.console .tile-value strong { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
body.console .tile-value strong.small { font-size: 14.5px; font-weight: 500; letter-spacing: 0; }
body.console .tile-foot { margin-top: 4px; color: #7f7f8b; font-size: 12px; }
body.console .tile .badge--ok { color: #6ee7a0; }
body.console .tile .badge--warn { color: #ffcf87; }
body.console .tile .badge--bad { color: #fca5a5; }
body.console .tile .badge--muted { color: #b9b9c4; }
body.console .tile-foot .badge { padding: 0; border: 0; background: none; font-size: 12px; font-weight: 500; }
body.console .tile-foot .badge::before { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; content: ""; vertical-align: 1px; }

/* 面板 */
body.console .split { gap: 12px; }
body.console .split .pcard { margin-top: 0; }
body.console .split + .pcard,
body.console .pcard + .pcard { margin-top: 12px; }
body.console .pcard { padding: 18px; border-radius: 14px; background: rgba(255, 255, 255, .03); }
body.console .pcard-head { align-items: flex-start; margin-bottom: 14px; }
body.console .pcard-head h2 { font-size: 15.5px; }
body.console .pcard-head p { margin-top: 4px; }

body.console .field .textarea { min-height: 108px; border-radius: 10px; background: rgba(0, 0, 0, .26); font-size: 12.5px; line-height: 1.6; }
body.console .form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.console .file-btn { cursor: pointer; }

/* 任务：分隔线列表，去掉强调条与胶囊 */
body.console .task-list { gap: 0; }
body.console .task-item { padding: 13px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, .07); border-radius: 0; background: none; }
body.console .task-item:first-child { padding-top: 0; border-top: 0; }
body.console .task-top h3 { font-size: 15px; }
body.console .task-meta { gap: 4px 14px; margin-top: 8px; }
body.console .task-meta span { padding: 0; border: 0; background: none; font-size: 12.5px; }
body.console .task-actions { margin-top: 11px; }

body.console .empty-state { display: grid; justify-items: start; gap: 10px; padding: 16px; border: 1px dashed rgba(255, 255, 255, .12); border-radius: 12px; }
body.console .empty-state svg { width: 22px; height: 22px; fill: none; stroke: #ff8a3d; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
body.console .empty-state p { max-width: 40em; color: #8d8d99; font-size: 13px; }

/* 卡密 */
body.console .redeem-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.console .redeem-row .input {
  flex: 1 1 240px; max-width: 320px; height: 36px; border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; letter-spacing: .04em;
}
body.console .hint-line { margin-top: 10px; color: #7f7f8b; font-size: 12px; }

/* 记录表 */
body.console .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
body.console table.data { min-width: 540px; }
body.console table.data th { padding: 9px 12px; background: rgba(255, 255, 255, .03); }
body.console table.data td { padding: 10px 12px; }
body.console .empty-cell { padding: 22px 14px !important; color: var(--muted); font-size: 13px; text-align: center; }
body.console table.data pre { max-width: 520px; margin: 6px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, .3); color: #b9b9c4; font-size: 12px; white-space: pre-wrap; }

/* 折叠面板 */
body.console .pcard--fold { padding: 0; }
body.console .pcard--fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; color: #d7d7de; font-size: 14.5px; font-weight: 600; list-style: none; cursor: pointer; }
body.console .pcard--fold > summary::-webkit-details-marker { display: none; }
body.console .pcard--fold > summary::after { width: 7px; height: 7px; border-right: 1.5px solid #9c9ca8; border-bottom: 1.5px solid #9c9ca8; transform: rotate(45deg); content: ""; transition: transform .16s ease; }
body.console .pcard--fold[open] > summary { border-bottom: 1px solid var(--line); }
body.console .pcard--fold[open] > summary::after { transform: rotate(-135deg); }
body.console .fold-body { padding: 16px 18px 18px; }

@media (max-width: 620px) {
  body.console .page { padding: 22px 0 64px; }
  body.console .tiles { grid-template-columns: 1fr; }
  body.console .pcard { padding: 15px; }
  body.console .redeem-row .btn { width: 100%; }
}

/* 账号登录（验证码 / 密码） */
body.console .dy-login { display: grid; gap: 14px; }
body.console .dy-login [hidden] { display: none !important; }
body.console .dy-tabs {
  display: inline-flex; gap: 4px; padding: 4px; border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px; background: rgba(0, 0, 0, .26); justify-self: start;
}
body.console .dy-tab {
  padding: 6px 16px; border: 0; border-radius: 7px; background: transparent; color: #9a9aa6;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: background .16s ease, color .16s ease;
}
body.console .dy-tab:hover { color: #d7d7de; }
body.console .dy-tab.is-on { background: rgba(255, 138, 61, .16); color: #ffb37a; }
body.console .dy-fields { display: grid; gap: 12px; }
body.console .dy-phone, body.console .dy-code { display: flex; align-items: stretch; gap: 8px; }
body.console .dy-phone .input, body.console .dy-code .input { flex: 1 1 auto; min-width: 0; }
body.console .dy-prefix {
  display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px; background: rgba(255, 255, 255, .04); color: #9a9aa6; font-size: 13px; white-space: nowrap;
}
body.console .dy-code .btn { flex: 0 0 auto; }
body.console .dy-status { margin: 0; min-height: 20px; color: #b9b9c4; font-size: 13px; }
body.console .dy-status.is-ok { color: #6ee7a0; }
body.console .dy-status.is-bad { color: #fca5a5; }
body.console .dy-status.is-wait { color: #ffcf87; }
body.console .dy-success {
  display: grid; justify-items: start; gap: 10px; padding: 12px 14px;
  border: 1px solid rgba(110, 231, 160, .28); border-radius: 10px; background: rgba(110, 231, 160, .08);
}
body.console .dy-success p { margin: 0; color: #c8f7da; font-size: 13px; }
body.console .fallback { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
body.console .fallback > summary { display: flex; align-items: center; gap: 7px; color: #9a9aa6; font-size: 12.5px; list-style: none; cursor: pointer; }
body.console .fallback > summary::-webkit-details-marker { display: none; }
body.console .fallback > summary::before { width: 5px; height: 5px; border-right: 1.5px solid #9a9aa6; border-bottom: 1.5px solid #9a9aa6; transform: rotate(-45deg); content: ""; transition: transform .16s ease; }
body.console .fallback[open] > summary::before { transform: rotate(45deg); }
body.console .fallback-body { padding-top: 12px; }

@media (max-width: 620px) {
  body.console .dy-tabs { display: flex; width: 100%; justify-self: stretch; }
  body.console .dy-tab { flex: 1 1 0; text-align: center; }
  body.console .dy-phone, body.console .dy-code { flex-wrap: wrap; }
  body.console .dy-code .btn { width: 100%; justify-content: center; }
}
