/* --------------------------------------------------------------------------
   会员表单（前台）

   配色一律取主题里已定义的变量，不另写颜色值：主强调色在后台「主题设置」里
   是可改的，写死颜色会让这几页在改色之后变成孤岛。
   变量取不到时（比如换了主题）用后面的兜底值，页面仍然可读。
   -------------------------------------------------------------------------- */

.gm-page {
    max-width: 420px;
    margin: 48px auto 72px;
    padding: 0 20px;
}

.gm-page-title {
    font-family: var(--guji-serif, Georgia, serif);
    font-size: 1.6rem;
    color: var(--guji-ink, #23201A);
    margin: 0 0 8px;
}

.gm-page-sub {
    color: var(--guji-ink-faint, #6E6658);
    font-size: 0.9rem;
    margin: 0 0 24px;
    line-height: 1.7;
}

.gm-form {
    display: block;
}

.gm-field {
    margin-bottom: 18px;
}

.gm-field > label {
    display: block;
    font-size: 0.88rem;
    color: var(--guji-ink-soft, #595246);
    margin-bottom: 6px;
}

.gm-field input[type="text"],
.gm-field input[type="tel"],
.gm-field input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 11px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--guji-ink, #23201A);
    background: var(--guji-card, #FFFDF7);
    border: 1px solid var(--guji-rule, #DED5C2);
    border-radius: var(--guji-radius, 3px);
    transition: border-color .15s ease;
}

.gm-field input:focus {
    outline: none;
    border-color: var(--guji-cinnabar, #A02C1F);
}

/* 手机号、验证码这类内容是一串数字，等宽显示时读者核对起来不容易串行 */
.gm-field input[name="phone"],
.gm-field input[name="code"],
.gm-field input[name="captcha"] {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

/* 输入框 + 右侧按钮/图片 */
.gm-inline {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.gm-inline input {
    flex: 1 1 auto;
    min-width: 0;
}

.gm-captcha {
    flex: 0 0 auto;
    display: block;
    height: 40px;
    width: 110px;
    cursor: pointer;
    border: 1px solid var(--guji-rule, #DED5C2);
    border-radius: var(--guji-radius, 3px);
    background: var(--guji-paper-deep, #EBE5D7);
}

.gm-code-btn {
    flex: 0 0 auto;
    padding: 0 14px;
    font-size: 0.85rem;
    font-family: inherit;
    white-space: nowrap;
    color: var(--guji-cinnabar, #A02C1F);
    background: transparent;
    border: 1px solid var(--guji-cinnabar, #A02C1F);
    border-radius: var(--guji-radius, 3px);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.gm-code-btn:hover:not(:disabled) {
    background: var(--guji-cinnabar, #A02C1F);
    color: #fff;
}

/* 倒计时期间：看得出「不是坏了，是还得等」，而不是一个死灰的按钮 */
.gm-code-btn:disabled {
    color: var(--guji-ink-faint, #6E6658);
    border-color: var(--guji-rule, #DED5C2);
    background: var(--guji-paper-deep, #EBE5D7);
    cursor: default;
}

.gm-hint {
    margin: 6px 0 0;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--guji-ink-faint, #6E6658);
}

.gm-submit {
    width: 100%;
    margin-top: 6px;
    padding: 11px 16px;
    font-size: 0.98rem;
    font-family: inherit;
    color: #fff;
    background: var(--guji-cinnabar, #A02C1F);
    border: 1px solid var(--guji-cinnabar, #A02C1F);
    border-radius: var(--guji-radius, 3px);
    cursor: pointer;
    transition: background-color .15s ease;
}

.gm-submit:hover:not(:disabled) {
    background: var(--guji-cinnabar-deep, #7c2218);
}

.gm-submit:disabled {
    opacity: .6;
    cursor: default;
}

/* 提示条。成功和失败用不同底色——读者扫一眼就该知道是好消息还是坏消息 */
.gm-message {
    margin: 0 0 16px;
    padding: 9px 12px;
    font-size: 0.86rem;
    line-height: 1.6;
    border-radius: var(--guji-radius, 3px);
    border-left: 3px solid var(--guji-cinnabar, #A02C1F);
    background: var(--guji-cinnabar-wash, #f7ebe9);
    color: var(--guji-ink, #23201A);
}

.gm-message.is-ok {
    border-left-color: #3f7d5f;
    background: #eef5f0;
}

.gm-page-foot {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--guji-rule-soft, #EBE4D5);
    font-size: 0.85rem;
}

.gm-page-foot a {
    color: var(--guji-ink-faint, #6E6658);
    text-decoration: none;
}

.gm-page-foot a:hover {
    color: var(--guji-cinnabar, #A02C1F);
    text-decoration: underline;
}

/* 弹窗里的表单：外面已经有内边距和标题，这里只收掉多余的外边距 */
.guji-auth-body .gm-form {
    margin: 0;
}

.guji-auth-body .gm-field:last-of-type {
    margin-bottom: 14px;
}

@media (max-width: 480px) {
    .gm-page {
        margin-top: 28px;
    }

    /* 窄屏上验证码图和输入框挤在一行会双双变得太小，换成两行 */
    .gm-inline {
        flex-wrap: wrap;
    }

    .gm-inline input {
        flex: 1 1 100%;
    }

    .gm-captcha,
    .gm-code-btn {
        flex: 1 1 auto;
    }
}
