/* ============================================================
   登录 / 注册页（auth-*）
   设计语言与首页 / 用户中心一致：浅色、细边框、方角、品牌蓝点缀。
   ============================================================ */

body.user-auth-body {
    margin: 0;
    min-height: 100vh;
    padding: 0;
    background: var(--sk-bg, #fafafa);
    color: var(--sk-text-1, #16181d);
    font-family: var(--sk-font-sans);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
}

/* Vue 挂载前隐藏整个 shell，避免未编译的模板/插值闪现 */
.auth-shell[v-cloak] { display: none; }

/* ---------- 左侧品牌区（亮色，参考主流云厂商登录页） ---------- */
.auth-left {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    padding: 36px 48px 28px;
    background: linear-gradient(160deg, #f3f7ff 0%, #fafcff 45%, #f5f9ff 100%);
    color: var(--sk-text-1, #16181d);
    overflow: hidden;
    border-right: 1px solid var(--sk-border, #e5e6eb);
}
.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(22, 93, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 93, 255, .045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(720px 480px at 20% 10%, #000, transparent 76%);
    -webkit-mask-image: radial-gradient(720px 480px at 20% 10%, #000, transparent 76%);
    pointer-events: none;
}
.auth-left::after {
    content: '';
    position: absolute;
    right: -140px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(22, 93, 255, .08), transparent 68%);
    pointer-events: none;
}
.auth-left > * { position: relative; z-index: 1; }
.auth-left > div:first-child { margin: auto 0; }
.auth-logo { margin: 0 0 16px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--sk-text-1); }
.auth-logo img { display: block; max-width: 170px; height: 32px; object-fit: contain; }
.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--sk-brand, #165dff);
    font-family: var(--sk-font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.auth-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sk-brand, #165dff); }
.auth-headline {
    margin: 0 0 10px;
    max-width: 460px;
    color: var(--sk-text-1, #16181d);
    font-size: clamp(24px, 2.6vw, 32px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.02em;
}
.auth-desc { margin: 0 0 18px; max-width: 400px; color: var(--sk-text-2, #4e5969); font-size: 14px; line-height: 1.6; }

.auth-feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.auth-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--sk-text-1, #1d2129);
    font-size: 13px;
    font-weight: 500;
}
.auth-feature i { color: var(--sk-brand, #165dff); font-size: 15px; }

.auth-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 0;
    border: 1px solid var(--sk-border, #e5e6eb);
    background: var(--sk-border, #e5e6eb);
    border-radius: var(--sk-r-md, 10px);
    overflow: hidden;
}
.auth-stat { padding: 10px 12px; background: #fff; }
.auth-stat strong { display: block; margin-bottom: 2px; color: var(--sk-brand, #165dff); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.auth-stat span { display: block; color: var(--sk-text-3, #86909c); font-size: 11px; }

/* 运行状态面板 */
.auth-mid-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--sk-border, #e5e6eb); }
.auth-mid-title {
    margin: 0 0 10px;
    color: var(--sk-text-3, #86909c);
    font-family: var(--sk-font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.auth-mid-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.auth-mid-item {
    padding: 8px 12px;
    color: var(--sk-text-1, #1d2129);
    font-size: 12px;
    background: #fff;
    border: 1px solid var(--sk-border, #e5e6eb);
    border-radius: var(--sk-r-sm, 6px);
}
.auth-mid-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.auth-mid-list li { position: relative; padding-left: 16px; color: var(--sk-text-2, #4e5969); font-size: 12px; line-height: 1.5; }
.auth-mid-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--sk-brand, #165dff);
}

/* ---------- 右侧表单区 ---------- */
.auth-right {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-height: 0; /* 允许网格项收缩，使右侧 overflow-y 滚动生效 */
    padding: 52px 24px 28px;
    background: var(--sk-bg, #fafafa);
    overflow-y: auto;
}
.auth-lang-switch { position: absolute; top: 16px; right: 22px; z-index: 20; }

.auth-form-wrap { position: relative; width: 100%; max-width: 420px; flex-shrink: 0; }
.auth-side-notes { width: 100%; max-width: 420px; flex-shrink: 0; }
.auth-card-brand { display: flex; align-items: center; min-height: 28px; margin-bottom: 12px; }
.auth-card-brand img { max-width: 150px; max-height: 30px; object-fit: contain; }
.auth-card-brand span { color: var(--sk-text-1); font-size: 17px; font-weight: 700; }
.auth-title { margin: 0 0 6px; color: var(--sk-text-1); font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.auth-subtitle { margin: 0 0 16px; color: var(--sk-text-2); font-size: 13px; }

/* ---------- Arco 组件外观对齐 ---------- */
.auth-shell .arco-tabs-nav { margin-bottom: 12px; }
.auth-shell .arco-tabs-nav::before { background: var(--sk-border); }
.auth-shell .arco-tabs-tab { color: var(--sk-text-2); font-weight: 600; padding: 10px 0; }
.auth-shell .arco-tabs-tab-active { color: var(--sk-brand); }
.auth-shell .arco-tabs-tab-btn:focus-visible { outline: 2px solid var(--sk-brand); outline-offset: 2px; }
.auth-shell .arco-form-item { margin-bottom: 12px; }
.auth-shell .arco-form-item-label { color: var(--sk-text-1); font-size: 13px; font-weight: 600; padding-bottom: 4px; }

.auth-shell .arco-input-wrapper {
    min-height: 38px;
    border-radius: var(--sk-r-sm, 6px);
    border: 1px solid var(--sk-border-strong, #d4d9e2) !important;
    background: #fff !important;
    box-shadow: none !important;
}
.auth-shell .arco-input-wrapper .arco-input { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.auth-shell .arco-input-wrapper:hover { border-color: var(--sk-brand) !important; }
.auth-shell .arco-input-wrapper-focus {
    border-color: var(--sk-brand) !important;
    box-shadow: 0 0 0 3px var(--sk-brand-ring, rgba(0, 82, 217, .18)) !important;
    background: #fff !important;
}

.auth-shell .captcha-inline { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 10px; }
.auth-shell .captcha-img {
    height: 38px;
    border: 1px solid var(--sk-border-strong, #d4d9e2);
    border-radius: var(--sk-r-sm, 6px);
    background: var(--sk-surface-2, #f5f7fa);
}

.auth-shell .geetest-slot { position: relative; z-index: 20; width: 100%; min-width: 0; height: 40px; display: flex; align-items: center; overflow: visible; }
.auth-shell .geetest-entry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 38px;
    border: 1px solid var(--sk-border-strong, #d4d9e2);
    border-radius: var(--sk-r-sm, 6px);
    background: #fff;
    color: var(--sk-text-1);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: border-color var(--sk-dur) var(--sk-ease), color var(--sk-dur) var(--sk-ease), background-color var(--sk-dur) var(--sk-ease);
}
.auth-shell .geetest-entry:hover { border-color: var(--sk-brand); color: var(--sk-brand); }
.auth-shell .geetest-entry.is-verified { border-color: var(--sk-brand); background: var(--sk-brand-soft, #eaf1ff); color: var(--sk-brand); }
.auth-shell .geetest-entry-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--sk-brand-soft, #eaf1ff);
    color: var(--sk-brand);
    font-size: 12px;
    line-height: 1;
}
.auth-shell .geetest-native { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.auth-shell .geetest-native > div { width: 100%; max-width: 100%; }
.auth-shell .geetest-slot .geetest_box,
.auth-shell .geetest-slot .geetest_holder,
.auth-shell .geetest-slot .gt4_holder { width: 100% !important; max-width: 100% !important; }

.auth-shell .send-btn { width: 116px; height: 38px; border-radius: var(--sk-r-sm, 6px); }
.auth-shell .submit-btn {
    height: 40px;
    border-radius: var(--sk-r-sm, 6px);
    font-size: 14px;
    font-weight: 700;
    background: var(--sk-brand) !important;
    border-color: var(--sk-brand) !important;
    box-shadow: none !important;
}
.auth-shell .submit-btn:hover { background: var(--sk-brand-hover, #0040a8) !important; border-color: var(--sk-brand-hover, #0040a8) !important; }
.auth-shell .terms-line { display: flex; align-items: flex-start; margin: -2px 0 10px; }
.auth-shell .switch-line { margin-top: 12px; color: var(--sk-text-2); font-size: 13px; }
.auth-shell .switch-line a { color: var(--sk-brand); font-weight: 600; }

.auth-shell .aff-box {
    margin: 0 0 14px;
    border: 1px solid var(--sk-brand-soft, #eaf1ff);
    border-radius: var(--sk-r-sm, 6px);
    background: var(--sk-brand-soft, #eaf1ff);
    color: var(--sk-brand);
}
.auth-shell .readonly-input,
.auth-shell .readonly-input:hover,
.auth-shell .readonly-input.arco-input-wrapper-focus {
    background: var(--sk-surface-2, #f5f7fa) !important;
    border-color: var(--sk-border) !important;
    box-shadow: none !important;
}
.auth-shell .readonly-input .arco-input { background: transparent !important; color: var(--sk-text-3) !important; cursor: default !important; }

/* 右侧补充说明 */
.auth-side-notes { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--sk-border); }
.auth-side-title { margin: 0 0 8px; color: var(--sk-text-1); font-size: 14px; font-weight: 600; }
.auth-note-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.auth-note-list li { position: relative; padding-left: 20px; color: var(--sk-text-2); font-size: 12px; line-height: 1.5; }
.auth-note-list li::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 5px;
    width: 5px;
    height: 8px;
    border: solid var(--sk-brand);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.auth-tip-box {
    display: none;
    margin-top: 12px;
    padding: 10px 14px;
    color: var(--sk-text-2);
    font-size: 12px;
    line-height: 1.6;
    background: var(--sk-surface-2, #f5f7fa);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-r-sm, 6px);
}

/* ---------- 异地登录弹窗 ---------- */
.secondary-login-dialog .arco-modal { border-radius: var(--sk-r-md, 10px); }
.secondary-login-dialog .arco-modal-body { max-height: calc(100vh - 200px); overflow-y: auto; }
.secondary-method-group { display: flex; flex-direction: column; gap: 10px; }
.secondary-method-group .arco-radio { margin-right: 0; }
.secondary-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- 响应式 ---------- */
@media (max-height: 760px) and (min-width: 1101px) {
    .auth-left { padding: 28px 40px 22px; gap: 14px; }
    .auth-headline { font-size: 22px; }
    .auth-desc { margin-bottom: 12px; }
    .auth-mid-panel { margin-top: 12px; padding-top: 12px; }
    .auth-stats { display: none; }
    .auth-right { padding: 44px 24px 20px; }
}
@media (max-width: 1100px) {
    .auth-shell { grid-template-columns: 1fr; height: auto; min-height: 100vh; overflow: visible; }
    .auth-left { display: none; }
    .auth-right { padding: 56px 24px 32px; }
}
@media (max-width: 640px) {
    body.user-auth-body { background: var(--sk-surface); }
    .auth-right { padding: 48px 18px 28px; justify-content: flex-start; }
    .auth-title { font-size: 21px; }
    .auth-shell .captcha-inline { grid-template-columns: 1fr; }
    .auth-shell .send-btn { width: 100%; }
    .auth-lang-switch { top: 12px; right: 14px; }
    .auth-note-list { grid-template-columns: 1fr; }
}
