/*
 * Alice 品牌部署（ACCOUNT_BRAND=alice）的账号页外观。
 * 只在 <body class="brand-alice"> 下生效；配色与字体取自 Alice 官网 docs/landing/style.css。
 * 不引外链字体：alice.fans 的用户大量在国内，外链字体表会阻塞首屏。
 */
.brand-alice {
  --accent: #c25566;
  --accent-hover: #a8455a;
  --accent-light: #fbeff1;
  --text: #1a1714;
  --text-muted: #6b6460;
  --text-sm: #9a928c;
  --border: #e8e4dc;
  --bg: #fafaf7;
  --card-bg: #ffffff;
  --btn-disabled-bg: #efece6;
  --btn-disabled-text: #a59d97;
  --shadow: 0 6px 28px rgba(60, 40, 30, .08);
  --alice-ink: #1a1714;
  --alice-gold: #c9a96e;
  --alice-serif: 'Songti SC', 'STSong', 'Noto Serif SC', 'Playfair Display', Georgia, serif;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'PingFang TC',
    'Apple SD Gothic Neo', 'Hiragino Sans GB', 'Microsoft YaHei', 'Malgun Gothic', sans-serif;
  color: var(--text);
}

/* ── 品牌字标 ── */
.brand-alice .brand-wordmark {
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ── 登录 / 注册：左侧主视觉 ── */
.brand-alice .brand-panel {
  width: 52%;
  background: #2b2420 url('/static/brand/alice/login-hero.webp') 72% center / cover no-repeat;
  padding: 40px 48px;
}
.brand-alice .brand-panel::before {
  /* 顶部压暗一点让 Logo 与语言切换读得清，底部渐深托住文案 */
  content: '';
  position: absolute; inset: 0;
  width: auto; height: auto; border-radius: 0;
  background:
    linear-gradient(180deg, rgba(26, 23, 20, .38) 0%, rgba(26, 23, 20, 0) 22%),
    linear-gradient(0deg, rgba(26, 23, 20, .82) 0%, rgba(26, 23, 20, .45) 30%, rgba(26, 23, 20, 0) 58%);
  top: 0; right: 0;
}
.brand-alice .brand-panel::after { display: none; }
.brand-alice .brand-logo img {
  height: 40px; width: 40px;
  border-radius: 50%;
  object-fit: cover;
  filter: none;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .7);
}
.brand-alice .brand-logo .brand-wordmark {
  color: #fff;
  font-size: 18px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .25);
}
.brand-alice .brand-body { margin-top: auto; margin-bottom: 28px; }
.brand-alice .brand-headline {
  font-family: var(--alice-serif);
  font-weight: 600;
  font-size: 40px;
  letter-spacing: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}
.brand-alice .brand-headline em {
  display: block;
  margin-top: 12px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, .88);
}
.brand-alice .brand-sub { color: rgba(255, 255, 255, .78); max-width: 380px; }
.brand-alice .brand-features { display: none; }
.brand-alice .brand-steps { margin-top: 28px; }
.brand-alice .brand-step-num { background: rgba(255, 255, 255, .18); }
.brand-alice .brand-step-text { color: rgba(255, 255, 255, .82); }
.brand-alice .brand-footer { color: rgba(255, 255, 255, .55); }

/* ── 表单区 ── */
.brand-alice .form-panel { background: var(--bg); }
.brand-alice .form-title {
  font-family: var(--alice-serif);
  font-weight: 600;
  font-size: 28px;
}
.brand-alice .field input,
.brand-alice .phone-input-group { background: #fff; }
.brand-alice .field input:focus,
.brand-alice .phone-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 85, 102, .12);
}
.brand-alice .btn-submit {
  border-radius: 999px;
  background: var(--alice-ink);
  box-shadow: 0 6px 18px rgba(26, 23, 20, .16);
}
.brand-alice .btn-submit:hover {
  background: #3a332e;
  box-shadow: 0 6px 22px rgba(26, 23, 20, .22);
}
.brand-alice .btn-submit:disabled { background: #b9b2ab; box-shadow: none; }
.brand-alice .btn-oauth { border-radius: 999px; background: #fff; }
.brand-alice .btn-oauth:hover { box-shadow: 0 0 0 3px rgba(194, 85, 102, .1); }
.brand-alice .btn-send { border-radius: 999px; }

/* ── 卡片页（找回密码、授权确认、跳转、观猹关联） ── */
.brand-alice .card { border-color: var(--border); border-radius: 20px; }
.brand-alice .logo-wrap {
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.brand-alice .logo-wrap .logo-img {
  height: 44px; width: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.brand-alice .user-info { background: #f5f3ee; border-color: var(--border); }
.brand-alice .title + p,
.brand-alice .user-via { color: var(--text-muted); }
.brand-alice .logo-wrap .brand-wordmark { font-size: 18px; color: var(--accent); }
.brand-alice .card .btn { border-radius: 999px; }
.brand-alice .card .btn-primary { background: var(--alice-ink); border-color: var(--alice-ink); }
.brand-alice .card .btn-primary:hover { background: #3a332e; border-color: #3a332e; }

/* ── 用户中心 / 控制台页头：方形头像 Logo 改圆 ── */
.brand-alice .sidebar-logo-brand img,
.brand-alice .mobile-bar-brand img {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ── 用户中心 / 控制台侧栏：与充值页同一套橙黄色调（2026-10-15 定稿） ──
 * 侧栏是所有账号页共用的，原来的灰白中性色挨着充值页的奶油底很突兀。
 * 只在侧栏与手机顶栏上重设 console.css 的颜色变量，主内容区各页不受影响；
 * 色值取自 recharge.css 橙黄色调修订块（可可棕 #3d200c、杏色细线 #fde3c4、主橙 #e5600c），
 * 设计稿见 .preview/gamified/橙黄色调/。暗色不跟着变橙，沿用下面那组暖金深色。 */
.brand-alice :is(.sidebar, .app-mobile-bar) {
  --bg-card: #fffaf2;
  --bg-subtle: #fff3e3;
  --bg-muted: #ffead0;
  --text-primary: #3d200c;
  --text-secondary: #8a6146;
  --text-tertiary: #b8977b;
  --border-light: #fde9cf;
  --border-medium: #fde3c4;
  --alice-nav-active: #3d200c;
  --alice-nav-icon: #e5600c;
}
[data-theme="dark"] .brand-alice :is(.sidebar, .app-mobile-bar) {
  --bg-card: #1f1c18;
  --bg-subtle: #2a251e;
  --bg-muted: #352d21;
  --text-primary: #f3ead8;
  --text-secondary: #c9bfae;
  --text-tertiary: #8f8574;
  --border-light: #2e2920;
  --border-medium: #3a3226;
  --alice-nav-active: #f3dfad;
  --alice-nav-icon: #edc577;
}
.brand-alice .sidebar,
.brand-alice .app-mobile-bar { background: var(--bg-card); }
.brand-alice .sidebar-brand-name { color: var(--text-primary); letter-spacing: -.01em; }
.brand-alice .nav-section-label { color: var(--text-tertiary); }
/* 首充入口自带一套金色渐变与图标底色，不跟着普通导航项走 */
.brand-alice .nav-item:not(.nav-item-first-recharge) { color: var(--text-primary); }
.brand-alice .nav-item:not(.nav-item-first-recharge) svg { color: var(--text-secondary); }
.brand-alice .nav-item:not(.nav-item-first-recharge):hover svg { color: var(--text-primary); }
.brand-alice .nav-item.active:not(.nav-item-first-recharge) { color: var(--alice-nav-active); font-weight: 650; }
.brand-alice .nav-item.active:not(.nav-item-first-recharge) svg { color: var(--alice-nav-icon); }
.brand-alice .account-sidebar-avatar { color: var(--alice-nav-active); background: var(--bg-muted); border-color: var(--border-medium); }
/* 「充值」一项换成糖豆图标：保留原 svg 占位（收起侧栏时靠它对齐），只把描边透明、底下垫糖豆图。 */
.brand-alice .nav-item[href="/console/recharge"]:not(.nav-item-first-recharge) svg {
  color: transparent;
  background: url('/static/img/recharge/jellybean/jellybean.png') center / contain no-repeat;
}
.brand-alice .nav-item.active[href="/console/recharge"]:not(.nav-item-first-recharge) svg { color: transparent; transform: rotate(-12deg); }
:root:not([data-theme="dark"]) .brand-alice .sidebar {
  background: linear-gradient(180deg, #fffaf2, #fff4e4);
  border-right-color: transparent;
  box-shadow: inset -1px 0 0 #fff, 1px 0 0 rgba(220, 150, 80, .12);
}
:root:not([data-theme="dark"]) .brand-alice .nav-item { border-radius: 12px; }
:root:not([data-theme="dark"]) .brand-alice .nav-item:not(.nav-item-first-recharge):hover { background: rgba(220, 150, 80, .07); }
:root:not([data-theme="dark"]) .brand-alice .nav-item.active:not(.nav-item-first-recharge) {
  font-weight: 600;
  background: linear-gradient(90deg, #ffe7c4, #fff0d4 55%, #fff6e2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .95), 0 6px 14px -10px rgba(230, 140, 50, .5);
}
:root:not([data-theme="dark"]) .brand-alice .account-sidebar-avatar {
  color: #fff;
  background: linear-gradient(135deg, #ffc04d, #ff7d4a);
  border-color: #fff;
}

/* 账号页独立面板也必须消费品牌令牌，不能只覆盖通用 .card。 */
:root[data-theme="light"] .brand-alice .main-content {
  --bg-body: #fffaf3;
  --bg-card: #fffefd;
  --bg-subtle: #fff4e6;
  --bg-muted: #ffecd5;
  --text-primary: #3d200c;
  --text-secondary: #805b40;
  --text-tertiary: #9b785d;
  --border-light: #f8ead8;
  --border-medium: #efdbc0;
  --border-strong: #dcb78b;
  --input-bg: #fffaf3;
  --primary: #64391e;
  --primary-hover: #462711;
  --primary-contrast: #fffaf3;
  --accent: #b64b0b;
  --accent-soft: #ffecd5;
  background: var(--bg-body);
  color: var(--text-primary);
}
.brand-alice #page-models .models-hero {
  padding: 24px;
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  background: var(--bg-card);
}
.brand-alice #page-models .model-toolbar {
  padding: 16px;
  border-radius: 16px;
}
.brand-alice #page-models .model-card {
  padding: 22px;
  border-radius: 20px;
}
.brand-alice #page-models .model-card:not(.alice-locked):hover {
  transform: none;
  border-color: var(--accent);
  box-shadow: none;
}
.brand-alice #page-models .model-card-title { font-size: 16px; }
.brand-alice #page-models .model-price-item { padding: 12px; border-radius: 12px; }
.brand-alice #page-models .model-price-label { font-size: 11px; color: var(--text-secondary); }
.brand-alice #page-models .model-price-value { font-size: 12px; }
.brand-alice #page-models .model-card.alice-locked {
  background: var(--bg-subtle);
  border-color: var(--border-medium);
}
.brand-alice #page-models .model-card.alice-locked :is(.model-card-head, .model-desc, .model-pricing) {
  opacity: 1;
  filter: none;
}
.brand-alice .main-content :is(.console-panel, .console-summary-tile, .panel-card, .stat-card) {
  border-color: var(--border-medium);
  background: var(--bg-card);
  border-radius: 18px;
}
@media (max-width: 760px) {
  .brand-alice #page-models .models-hero { padding: 18px; }
  .brand-alice #page-models .model-card { padding: 18px; }
}

/* 账号内容区共用尺寸，不改变登录与内嵌产品布局。 */
.brand-alice .app-layout {
  --radius: 16px;
  --radius-sm: 12px;
}
.brand-alice .main-content {
  min-width: 0;
}
.brand-alice .main-content :is(.panel-card, .stat-card, .card) {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius);
  box-shadow: none;
}
.brand-alice .main-content :is(.panel-header, .card-header) {
  border-bottom-color: var(--border-light);
}
.brand-alice .main-content :is(.page-title, .profile-page-head h1) {
  letter-spacing: -.025em;
}
.brand-alice .main-content .btn {
  border-radius: 10px;
}
/* 覆盖账号登录卡片的胶囊按钮规则，深浅主题继续使用控制台语义颜色。 */
.brand-alice .main-content .card .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast);
}
.brand-alice .main-content .card .btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.brand-alice .main-content :is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .brand-alice .main-content .panel-header { padding: 14px 16px; }
  .brand-alice .main-content .info-row { padding: 12px 16px; flex-wrap: wrap; }
  .brand-alice .main-content .info-val { overflow-wrap: anywhere; }
}

/* ── 桌面：整幅主视觉铺满，表单做成磨砂玻璃卡片浮在左侧（不再左右分栏） ── */
@media (min-width: 721px) {
  /* 注意：不要给 .brand-alice（整个 body）设背景色，用户中心、充值等所有页面都带这个 class，
   * 深色底会让它们整页变暗。深色底只放在 .brand-panel 自己身上（见上面的 #2b2420）。 */
  .brand-alice .brand-panel {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    padding: 36px 48px;
    background-position: 68% center;
  }
  .brand-alice .brand-panel::before {
    /* 顶部压暗托住 Logo 与语言切换；底部渐深托住文案与版权；左侧轻压一层，让玻璃卡片与背景分得开 */
    background:
      linear-gradient(180deg, rgba(26, 23, 20, .42) 0%, rgba(26, 23, 20, 0) 24%),
      linear-gradient(0deg, rgba(26, 23, 20, .72) 0%, rgba(26, 23, 20, .28) 26%, rgba(26, 23, 20, 0) 50%),
      linear-gradient(90deg, rgba(26, 23, 20, .22) 0%, rgba(26, 23, 20, 0) 46%);
  }
  .brand-alice .brand-body {
    /* 文案落在右下角，避开左侧卡片与人物脸部 */
    align-self: flex-end;
    max-width: 440px;
    margin: auto 0 20px;
    text-align: right;
  }
  .brand-alice .brand-headline { font-size: 34px; }
  .brand-alice .brand-sub { margin-left: auto; }
  .brand-alice .brand-steps { display: none; }
  .brand-alice .brand-footer { text-align: right; }

  .brand-alice .form-panel {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    width: min(100%, 548px);
    margin-left: clamp(16px, 7vw, 132px);
    padding: 40px 24px;
    background: transparent;
  }
  .brand-alice .form-box {
    max-width: 440px;
    padding: 40px 36px 34px;
    border-radius: 28px;
    /* 不用 backdrop-filter：Safari 里它与密码自动填充叠加，疑似导致密码框每输入一个字符就被整体选中。
     * 用更不透明的米白底代替，仍留一点透出。 */
    background: rgba(255, 252, 249, .94);
    border: 1px solid rgba(255, 255, 255, .62);
    box-shadow:
      0 24px 64px -16px rgba(26, 23, 20, .38),
      inset 0 1px 0 rgba(255, 255, 255, .7);
  }
  .brand-alice .field input,
  .brand-alice .phone-input-group { background: rgba(255, 255, 255, .82); }
}

/* 不支持 backdrop-filter 的环境：卡片退回近乎不透明的米白，文字依旧读得清 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .brand-alice .form-box { background: rgba(255, 252, 249, .96); }
}

/* ── 手机：主视觉收成顶部横幅，表单卡片压在图上 ── */
@media (max-width: 720px) {
  .brand-alice { flex-direction: column; }
  .brand-alice .brand-panel {
    display: flex;
    width: 100%;
    min-height: 260px;
    padding: 20px 20px 56px;
    background-position: 74% 30%;
  }
  .brand-alice .brand-body { margin: auto 0 0; }
  .brand-alice .brand-headline { font-size: 26px; margin-bottom: 0; }
  .brand-alice .brand-headline em { font-size: 15px; margin-top: 6px; }
  .brand-alice .brand-sub,
  .brand-alice .brand-steps,
  .brand-alice .brand-footer { display: none; }
  .brand-alice .lang-switcher { top: 14px; right: 14px; }
  .brand-alice .form-panel {
    align-items: flex-start;
    padding: 0 16px 32px;
    margin-top: -36px;
    position: relative;
    z-index: 2;
    background: transparent;
  }
  .brand-alice .form-box {
    padding: 28px 22px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(60, 40, 30, .12);
  }
  .brand-alice .form-title { font-size: 24px; }
}
