/* ============================================================
   signup.css —— 注册页专用样式
   ============================================================ */

/* ============================================================
   1. 布局：左侧固定，右侧独立滚动 + 内容垂直居中
   ============================================================ */

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.page {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

/* 左侧品牌区：固定 */
.brand {
    height: 100vh;
    overflow: hidden;
}

/* 右侧面板：flex column + 独立滚动 */
.login-panel {
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;   /* ★ 不要用 center，否则内容多时顶部会被裁 */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 72px 48px;
    scrollbar-width: thin;
    scrollbar-color: #c8c8c8 transparent;
}

.login-panel::-webkit-scrollbar {
    width: 8px;
}
.login-panel::-webkit-scrollbar-thumb {
    background: #c8c8c8;
    border-radius: 4px;
}
.login-panel::-webkit-scrollbar-track {
    background: transparent;
}

/* ★ 关键：margin:auto 让内容在剩余空间垂直 + 水平居中 */
.login {
    width: min(100%, 420px);
    margin: auto;
}

/* ============================================================
   2. 协议区块
   ============================================================ */

.agreement {
    padding: 0;
    margin: 15px 0 0;
    border: 0;
}

.agreement__all {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    color: #191919;
    line-height: 1.5;
    cursor: pointer;
    margin: 0 0 4px;
}

.agreement__divider {
    display: block !important;
    width: 100% !important;
    height: 1px !important;
    min-height: 1px !important;
    margin: 14px 0 !important;
    background: #e1e1e1 !important;
    border: 0 !important;
}

.agreement__list {
    display: grid;
    gap: 10px;
}

.agreement__item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #4b4b4b;
    font-size: 14px;
    line-height: 18px;
    cursor: pointer;
}

.agreement__item input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    border: 1px solid #c8c8c8;
    border-radius: 3px;
    accent-color: #2f5bfc;
    cursor: pointer;
}

.agreement__copy {
    min-width: 0;
}

.agreement__copy a {
    color: inherit;
    text-decoration: none;
}

.agreement__copy a:hover {
    text-decoration: underline;
}

.agreement__required {
    color: #2f5bfc;
    font-weight: 500;
}

.agreement__optional {
    color: #969696;
    font-weight: 400;
}

/* ============================================================
   3. 底部「重新输入电子邮件」链接
   ============================================================ */

.login__signup {
    margin: 28px 0 0;
    color: #606060;
    font-size: 13px;
    text-align: center;
}

.login__signup a {
    color: #2f5bfc;
    font-weight: 600;
    text-decoration: none;
}

.login__signup a:hover {
    text-decoration: underline;
}

/* ============================================================
   4. 窄屏适配（< 768px 改上下布局）
   ============================================================ */

@media (max-width: 767px) {
    html, body {
        overflow: auto;
        height: auto;
    }
    .page {
        display: block;
        height: auto;
        overflow: visible;
    }
    .brand {
        height: auto;
        min-height: 176px;
        overflow: visible;
    }
    .login-panel {
        display: block;
        height: auto;
        overflow: visible;
        padding: 32px 20px 48px;
    }
    .login {
        width: 100%;
        margin: 0 auto;   /* 窄屏不需要垂直居中 */
    }
}

/* ============================================================
   服务条款弹窗
   ============================================================ */

html.auth-terms-open,
body.auth-terms-open {
    overflow: hidden !important;
}

.auth-terms-modal {
    position: fixed;
    inset: 0;
    margin: auto !important;
    height: fit-content;

    width: min(560px, calc(100% - 48px));
    max-height: calc(100dvh - 48px);
    padding: 0;
    border: 1px solid #e1e1e1;
    border-radius: 24px;
    background: #fff;
    color: #000;
    box-shadow: 0 12px 32px rgba(25, 25, 25, 0.12);
}

.auth-terms-modal[open] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-terms-modal::backdrop {
    background: rgba(4, 17, 42, 0.44);
}

.auth-terms-modal__head {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #e1e1e1;
}

.auth-terms-modal__head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 26px;
    font-weight: 700;
}

.auth-terms-modal__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #323232;
    font-size: 20px;
    cursor: pointer;
}

.auth-terms-modal__close:hover {
    background: #f9faff;
}

.auth-terms-modal__body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
    color: #4b4b4b;
    font-size: 12px;
    line-height: 18px;
    word-break: keep-all;
}

.auth-terms-modal__body h3 {
    margin: 32px 0 16px;
    color: #000;
    font-size: 18px;
    line-height: 26px;
    font-weight: 600;
}

.auth-terms-modal__body h3:first-child {
    margin-top: 0;
}

.auth-terms-modal__body h4 {
    margin: 24px 0 12px;
    color: #191919;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}

.auth-terms-modal__body p {
    margin: 0 0 12px;
    white-space: pre-line;
}

.auth-terms-modal__date {
    color: #606060;
}

/* 表格 */
.auth-consent-table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.auth-consent-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font: inherit;
}

.auth-consent-table th,
.auth-consent-table td {
    padding: 12px;
    border: 1px solid #e1e1e1;
    text-align: left;
    vertical-align: top;
    word-break: normal;
}
.auth-consent-table.normal td{
    word-break: normal !important;
}
.auth-consent-table thead th {
    background: #f9faff;
    color: #323232;
    font-weight: 600;
}

.auth-consent-table tbody th {
    font-weight: 400;
}

.auth-consent-table--privacy col:nth-child(1) { width: 24%; }
.auth-consent-table--privacy col:nth-child(2) { width: 22%; }
.auth-consent-table--privacy col:nth-child(3) { width: 32%; }
.auth-consent-table--privacy col:nth-child(4) { width: 22%; }

.auth-consent-table--marketing col:nth-child(1) { width: 40%; }
.auth-consent-table--marketing col:nth-child(2) { width: 20%; }
.auth-consent-table--marketing col:nth-child(3) { width: 40%; }

.auth-consent-notice {
    margin: 24px 0 0;
    color: #4b4b4b;
}

.auth-consent-notice strong {
    display: block;
    font-weight: 600;
}

@media (max-width: 767px) {
    .auth-terms-modal {
        width: calc(100% - 24px);
        max-height: calc(100dvh - 24px);
    }
    .auth-terms-modal__head,
    .auth-terms-modal__body {
        padding: 16px;
    }
}

/* 引导页 chip */
.onboarding-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.onboarding-chip {
    padding: 10px 18px;
    border: 1px solid #c8c8c8;
    border-radius: 999px;
    background: #fff;
    color: #4b4b4b;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
}

.onboarding-chip:hover {
    border-color: #94abff;
}

.onboarding-chip.is-selected {
    border-color: #2f5bfc;
    background: #e7edff;
    color: #2f5bfc;
}

.onboarding-group {
    margin-bottom: 32px;
}

.onboarding-group .login__label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.onboarding-group .login__description {
    font-size: 13px;
    color: #888;
    margin-bottom: 0;
}

/* 按钮区 */
.substep-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    align-items: center;
}

/* 子步骤「下一步」按钮禁用态 */
.substep-actions .login__submit:disabled,
.substep-actions #btnNext:disabled {
    background: #c8c8c8;
    color: #6c6c6c;
    cursor: not-allowed;
    filter: none;
}