/* 登录/注册 — 佳和数码风格双栏布局 */

:root {
    --jh-bg: #eef2f8;
    --jh-card: #ffffff;
    --jh-primary: #409eff;
    --jh-primary-dark: #337ecc;
    --jh-primary-soft: #ecf5ff;
    --jh-text: #303133;
    --jh-muted: #909399;
    --jh-border: #dcdfe6;
    --jh-input-bg: #ffffff;
    --jh-tab-bg: #f2f3f5;
    --jh-shadow: 0 8px 32px rgba(15, 35, 75, 0.08);
    --jh-radius-card: 24px;
    --jh-radius-input: 10px;
    --jh-radius-tab: 12px;
}

.jh-auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    background: linear-gradient(135deg, #eef2f8 0%, #e8eef6 45%, #edf1f7 100%);
}

.jh-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px 56px;
    position: relative;
    overflow: hidden;
}

.jh-auth-brand__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    z-index: 1;
}

.jh-auth-brand__mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(64, 158, 255, 0.28);
}

.jh-auth-brand__name {
    font-size: 28px;
    font-weight: 700;
    color: #1a3a6e;
    letter-spacing: 0.02em;
}

.jh-auth-brand__illus {
    width: min(100%, 520px);
    z-index: 1;
}

.jh-auth-brand__illus svg {
    width: 100%;
    height: auto;
    display: block;
}

.jh-auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.jh-auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--jh-card);
    border-radius: var(--jh-radius-card);
    box-shadow: var(--jh-shadow);
    padding: 32px 36px 28px;
    position: relative;
}

.jh-auth-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.jh-auth-back {
    font-size: 13px;
    color: var(--jh-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.jh-auth-back:hover {
    color: var(--jh-primary);
}

.jh-auth-tabs {
    display: flex;
    gap: 0;
    padding: 4px;
    margin-bottom: 24px;
    background: var(--jh-tab-bg);
    border-radius: var(--jh-radius-tab);
}

.jh-auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 11px 0;
    border-radius: 10px;
    font-size: 15px;
    color: var(--jh-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.jh-auth-tab.active {
    background: #fff;
    color: var(--jh-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(15, 35, 75, 0.06);
}

.jh-auth-view {
    display: none;
}

.jh-auth-view.active {
    display: block;
}

.jh-auth-field {
    margin-bottom: 16px;
}

.jh-auth-input-wrap {
    position: relative;
}

.jh-auth-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--jh-border);
    border-radius: var(--jh-radius-input);
    background: var(--jh-input-bg);
    font-size: 14px;
    color: var(--jh-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.jh-auth-input:focus {
    outline: none;
    border-color: var(--jh-primary);
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.12);
}

.jh-auth-input::placeholder {
    color: #c0c4cc;
}

.jh-auth-input-wrap .jh-auth-input {
    padding-right: 44px;
}

.jh-auth-pwd-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #c0c4cc;
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.jh-auth-pwd-toggle:hover {
    color: var(--jh-primary);
    background: var(--jh-primary-soft);
}

.jh-auth-captcha-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.jh-auth-captcha-row .jh-auth-input {
    flex: 1;
    min-width: 0;
}

.jh-auth-captcha-img {
    width: 112px;
    height: 46px;
    border-radius: var(--jh-radius-input);
    border: 1px solid var(--jh-border);
    cursor: pointer;
    flex-shrink: 0;
    object-fit: cover;
    background: #f5f7fa;
}

.jh-auth-submit {
    margin-top: 8px;
}

.jh-auth-submit .layui-btn,
.jh-auth-btn-primary {
    width: 100%;
    height: 46px;
    line-height: 46px;
    padding: 0 20px;
    border: none;
    border-radius: var(--jh-radius-input);
    background: linear-gradient(180deg, #53a8ff 0%, var(--jh-primary) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(64, 158, 255, 0.35);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.jh-auth-submit .layui-btn:hover,
.jh-auth-btn-primary:hover {
    filter: brightness(1.03);
    box-shadow: 0 6px 18px rgba(64, 158, 255, 0.42);
}

.jh-auth-foot-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    font-size: 13px;
}

.jh-auth-foot-links a,
.jh-auth-link {
    color: var(--jh-primary);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 13px;
    font-family: inherit;
    padding: 0;
}

.jh-auth-foot-links a:hover,
.jh-auth-link:hover {
    color: var(--jh-primary-dark);
    text-decoration: underline;
}

.jh-auth-tip {
    margin-top: 14px;
    font-size: 12px;
    color: var(--jh-muted);
    line-height: 1.65;
    text-align: center;
}

.jh-auth-divider {
    display: flex;
    align-items: center;
    margin: 22px 0 16px;
    color: #c0c4cc;
    font-size: 12px;
}

.jh-auth-divider::before,
.jh-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ebeef5;
}

.jh-auth-divider span {
    padding: 0 12px;
}

.jh-auth-social {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.jh-auth-wechat-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 10px rgba(7, 193, 96, 0.18);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
    padding: 0;
}

.jh-auth-wechat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(7, 193, 96, 0.28);
}

.jh-auth-wechat-btn svg {
    width: 26px;
    height: 26px;
}

/* 微信扫码内嵌视图 */
.jh-auth-wechat-panel {
    text-align: center;
    padding: 8px 0 4px;
}

.jh-auth-wechat-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--jh-text);
    margin-bottom: 20px;
}

.jh-auth-wechat-qr-wrap {
    display: inline-flex;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border: 1px solid #d9ecff;
    margin-bottom: 16px;
    min-height: 248px;
    min-width: 248px;
    align-items: center;
    justify-content: center;
}

.jh-auth-wechat-qr-wrap img {
    width: 220px;
    height: 220px;
    border-radius: 8px;
    display: block;
    background: #fff;
}

.jh-auth-wechat-qr-loading {
    font-size: 13px;
    color: var(--jh-muted);
}

.jh-auth-wechat-desc {
    font-size: 13px;
    color: var(--jh-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.jh-auth-wechat-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    color: var(--jh-primary);
    font-size: 14px;
}

.jh-auth-wechat-subtip {
    font-size: 12px;
    color: #b1b3b8;
    line-height: 1.65;
    margin-top: 8px;
    text-align: left;
}

/* layui 兼容 */
.jh-auth-card .layui-form-item {
    margin-bottom: 0;
}

.jh-auth-card .layui-form-label,
.jh-auth-card .layui-input-block {
    display: none;
}

.jh-auth-card .layui-form .jh-auth-field .layui-input {
    height: 46px;
    border-radius: var(--jh-radius-input);
    border-color: var(--jh-border);
}

.jh-auth-card .layui-form .jh-auth-field .layui-input:focus {
    border-color: var(--jh-primary) !important;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.12);
}

.jh-auth-submit .layui-btn.is-wm-loading {
    background: linear-gradient(180deg, #53a8ff 0%, var(--jh-primary) 100%);
}

@media (max-width: 960px) {
    .jh-auth-page {
        grid-template-columns: 1fr;
    }

    .jh-auth-brand {
        padding: 32px 24px 16px;
        min-height: auto;
    }

    .jh-auth-brand__illus {
        max-width: 320px;
    }

    .jh-auth-brand__name {
        font-size: 22px;
    }

    .jh-auth-main {
        padding: 8px 16px 32px;
    }

    .jh-auth-card {
        padding: 24px 20px 22px;
        border-radius: 20px;
    }
}
