/* 参考站外观复刻：只覆盖页面外壳，设置卡片和协议控件沿用原面板。 */

/* 登录 */
body[data-route="login"] .app { max-width: none; box-shadow: none; }
.ref-login {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 20px;
  background: radial-gradient(120% 120% at 50% 34%, #fff8df 0%, #f6dc95 34%, #edbd5e 68%, #d99c35 100%);
}
.ref-login__card {
  width: 390px;
  max-width: 100%;
  padding: 32px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(90, 60, 10, .18);
  transform: none;
}
.ref-login__tabs {
  display: flex;
  height: 44px;
  margin: 0 0 38px;
  padding: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3e7ce;
}
.ref-login__tabs button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7b5a24;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.ref-login__tabs button.on { background: #fff; box-shadow: 0 1px 4px rgba(80, 55, 20, .08); }
.ref-login__card .login__field { margin-bottom: 22px; }
.ref-login__card .login__field .field__input {
  height: 44px;
  padding: 0 42px 0 13px;
  border-color: #eeeeee;
  border-radius: 6px;
  font-size: 14px;
}
.ref-login__card .login__field .field__input:focus { border-color: #f0b4a9; box-shadow: 0 0 0 3px rgba(255, 102, 92, .10); }
.ref-login__forgot {
  display: block;
  margin: -5px 0 14px;
  padding: 0;
  border: 0;
  background: none;
  color: #39b9e8;
  font-size: 13px;
  cursor: pointer;
}
.ref-login__card .login__btn {
  height: 40px;
  margin-top: 4px;
  border-radius: 9px;
  background: #ff6961;
  box-shadow: none;
  font-size: 14px;
  letter-spacing: 5px;
  text-indent: 5px;
}
.ref-login__card .formerr { margin-bottom: 12px; }

/* 首页账号卡片 */
body[data-route="home"] .view {
  display: block;
  min-height: 100vh;
  padding: 24px 20px calc(var(--tab-h) + var(--safe-b) + 28px);
  background: #f0f2f5;
}
.acctwrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 0; }
.acct {
  flex: 0 1 388px;
  width: 388px;
  max-width: 100%;
  min-height: 188px;
  padding: 14px 16px;
  border: 2px solid #d2b4be;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .10);
}
.acct__head { min-height: 32px; gap: 10px; }
.acct__icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: -.2px;
}
.acct__name { font-size: 20px; line-height: 1.35; font-weight: 700; color: #111; }
.acct__more { align-self: flex-start; padding: 0 3px; color: #333; font-size: 21px; line-height: 1; }
.acct__meta { display: block; margin: 10px 0 12px; color: #8a8f98; font-size: 13px; line-height: 1.45; }
.acct__exp { color: #f05255; }
.acct__bar { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin-top: 8px; padding: 12px 0 0; border-top: 1px solid #f3f3f3; }
.acct__bar .dot { width: 8px; height: 8px; box-shadow: none; background: #ed0b25; }
.acct__bar .dot--on { background: #18a058; box-shadow: none; }
.acct__bar .abtn {
  flex: 1 1 0;
  min-width: 0;
  height: 38px;
  padding: 0 7px;
  border-color: #eceff2;
  border-radius: 7px;
  background: #fff;
  color: #4c5560;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.acct__bar .abtn--blue { flex-grow: 1.25; border-color: #1677ff; background: #1677ff; color: #fff; }
.acct__bar .abtn:disabled { border-color: #f0f0f0; background: #f5f5f5; color: #b8b8b8; cursor: not-allowed; }
.acct-empty {
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 18vh;
  color: #999;
}
.acct-empty b { color: #666; font-size: 16px; }
.acct-empty span { font-size: 13px; }
.quota-fab {
  position: fixed;
  right: max(20px, calc((100vw - 1080px) / 2));
  bottom: calc(var(--tab-h) + var(--safe-b) + 20px);
  z-index: 18;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: #1677ff;
  color: #fff;
  box-shadow: 0 5px 14px rgba(22, 119, 255, .32);
  cursor: pointer;
}
.quota-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 底部导航 */
.tabbar { height: calc(56px + var(--safe-b)); box-shadow: 0 -1px 8px rgba(0, 0, 0, .08); border-top: 0; }
.tab { color: #a3a3a3; }
.tab.is-active { color: #1677ff; }
.tab--center {
  position: relative;
  flex: 1 1 0 !important;
  width: auto !important;
  height: 56px !important;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.tab--center svg {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 50%;
  background: #1677ff;
  box-shadow: 0 4px 12px rgba(22, 119, 255, .45);
  transform: translateX(-50%);
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
}
.function-menu__plus { margin-right: 8px; color: #1677ff; font-size: 20px; vertical-align: -1px; }

/* 弹窗与三步账号向导 */
.modal__panel { max-width: 360px; border-radius: 10px; padding: 20px; }
.modal__title { margin-bottom: 16px; font-size: 16px; }
.modal__body { color: #333; }
.acct-steps { display: flex; align-items: flex-start; margin: 0 0 22px; }
.acct-step { position: relative; display: flex; flex: 1; flex-direction: column; align-items: center; gap: 5px; color: #aaa; font-size: 12px; }
.acct-step:not(:last-child)::after { content: ''; position: absolute; top: 12px; left: calc(50% + 18px); width: calc(100% - 36px); height: 1px; background: #e5e5e5; }
.acct-step i { position: relative; z-index: 1; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #f0f0f0; color: #999; font-style: normal; }
.acct-step.on, .acct-step.done { color: #1677ff; }
.acct-step.on i, .acct-step.done i { background: #1677ff; color: #fff; }
.acct-wizard h3 { margin: 0 0 14px; font-size: 14px; }
.channel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.channel {
  display: flex;
  min-width: 0;
  height: 84px;
  padding: 9px 3px 6px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}
.channel.on { border-color: #1677ff; box-shadow: 0 0 0 2px rgba(22, 119, 255, .08); }
.channel:disabled { opacity: .48; cursor: not-allowed; }
.channel b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #fff; font-size: 11px; }
.channel__app { background: #f05255; }
.channel__zfb { background: #1677ff; }
.channel__dy { background: #222; }
.channel__tb { background: #ff7a22; }
.channel small { color: #999; font-size: 9px; }
.wizard-note { margin: 12px 0 0; color: #999; font-size: 11px; line-height: 1.5; }
.wizard-form label { gap: 7px; margin-bottom: 16px; font-size: 13px; }
.wizard-form label em { color: #f05255; font-style: normal; }
.wizard-form input, .wizard-form select { width: 100%; height: 42px; border: 1px solid #ddd; border-radius: 6px; background: #fff; padding: 0 11px; }
.wizard-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.wizard-actions .btn { flex: 1; height: 40px; }

/* 我的 */
body[data-route="mine"] .view { min-height: 100vh; padding: 24px 20px calc(var(--tab-h) + var(--safe-b) + 24px); background: #f4f5f7; }
.profile-card {
  position: relative;
  min-height: 210px;
  margin-bottom: 16px;
  padding: 10px 20px 100px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(128, 0, 128, .27), rgba(102, 51, 153, .22));
  box-shadow: 0 4px 8px rgba(0, 0, 0, .08);
}
.profile-main { display: flex; align-items: center; }
.profile-avatar { flex: 0 0 auto; width: 80px; height: 80px; margin: 0 18px 0 -10px; padding: 2px; border-radius: 50%; background: #fff; object-fit: cover; box-shadow: 0 4px 8px rgba(0, 0, 0, .18); }
.profile-user { min-width: 0; padding-top: 4px; }
.profile-user > strong { display: block; margin-bottom: 8px; color: #111; font-size: 18px; }
.profile-invite { display: flex; align-items: center; gap: 7px; color: #999; font-size: 12px; white-space: nowrap; }
.profile-invite b { color: #666; font-weight: 500; }
.profile-help { display: grid; place-items: center; width: 13px; height: 13px; border: 1px solid #8bbcff; border-radius: 50%; color: #69a7ff; font-size: 9px; }
.profile-invite button { margin-left: 6px; padding: 4px 13px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #7885ff, #7656e8); color: #fff; font-size: 11px; box-shadow: 0 3px 8px rgba(102, 51, 153, .22); }
.profile-expire { margin-top: 8px; color: #888; font-size: 11px; }
.profile-expire .is-bad { color: #f05255; }
.profile-stats {
  position: absolute;
  right: 14px;
  bottom: 16px;
  left: 14px;
  display: flex;
  height: 68px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .12);
}
.profile-stats > div { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.profile-stats b { color: #333; font-size: 16px; }
.profile-stats > div:last-child b { color: #d4a017; }
.profile-stats span { color: #aaa; font-size: 11px; }
.profile-options { overflow: hidden; border-radius: 10px; background: #fff; }
.profile-row {
  display: flex;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid #f5f5f5;
  background: #fff;
  color: #444;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.profile-row:last-child { border-bottom: 0; }
.profile-row__left { display: flex; align-items: center; gap: 10px; }
.profile-row__left img { width: 17px; height: 17px; }
.profile-row__arrow { color: #d1d1d1; font-size: 25px; font-weight: 300; }
.profile-row--logout { color: #f05255; }
.profile-icon { display: grid; place-items: center; width: 17px; height: 17px; font-size: 15px; }
.profile-icon--logout { color: #f05255; font-size: 22px; }

/* 配额、历史、密码 */
.quota-plan { display: flex; flex-direction: column; gap: 5px; padding: 16px; border-radius: 9px; background: #f6f2ff; }
.quota-plan b { color: #6941c6; }
.quota-plan span { color: #777; font-size: 12px; }
.quota-line { display: flex; justify-content: space-between; padding: 16px 3px; border-bottom: 1px solid #eee; }
.quota-panel p { margin: 14px 3px 0; color: #999; font-size: 12px; }
.history-tabs { display: flex; margin: -4px 0 14px; border-bottom: 1px solid #eee; }
.history-tabs button { flex: 1; padding: 9px 3px; border: 0; border-bottom: 2px solid transparent; background: none; color: #888; font-size: 12px; }
.history-tabs button.on { border-bottom-color: #1677ff; color: #1677ff; }
.history-list { max-height: 48vh; overflow-y: auto; }
.history-item { display: flex; flex-direction: column; gap: 5px; padding: 11px 2px; border-bottom: 1px solid #f1f1f1; }
.history-item > div { display: flex; flex-direction: column; gap: 2px; }
.history-item b { color: #444; font-size: 13px; }
.history-item span, .history-item time { color: #999; font-size: 11px; word-break: break-all; }
.history-empty { display: grid; place-items: center; min-height: 130px; color: #aaa; }
.password-form label span { color: #444; }
.password-submit { width: 100%; height: 40px; margin-top: 6px; }
.config-guide p { margin: 0 0 12px; line-height: 1.75; }
.config-guide p:last-child { margin-bottom: 0; }

/* 设置页外壳，内部卡片保持原样 */
body[data-route="setting"] .view { padding: 0 12px 110px; }
body[data-route="setting"] .savebar { display: none; }
body[data-route="setting"] .setbar { top: 0; }
.setting-back {
  position: fixed;
  left: max(16px, calc((100vw - 1080px) / 2));
  bottom: calc(var(--safe-b) + 24px);
  z-index: 18;
  width: 40px;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #fff;
  color: #333;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
body[data-route="setting"] .setting-fab { bottom: calc(var(--safe-b) + 22px); }

@media (min-width: 900px) {
  .acctwrap { justify-content: flex-start; }
  .ref-login__card { width: 400px; }
}
@media (max-width: 380px) {
  body[data-route="home"] .view, body[data-route="mine"] .view { padding-right: 12px; padding-left: 12px; }
  .acct { padding-right: 12px; padding-left: 12px; }
  .acct__bar { gap: 5px; }
  .acct__bar .abtn { font-size: 11px; }
  .profile-avatar { width: 68px; height: 68px; margin-right: 12px; }
  .profile-invite { gap: 5px; }
  .profile-invite button { margin-left: 2px; padding-right: 10px; padding-left: 10px; }
  .ref-login__card { padding: 26px 22px; }
}
