/* 云门户登录页 */
.cp-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #e8f4ff 0%, #f5f9ff 45%, #eef5ff 100%);
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.cp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.cp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #111827;
}

.cp-brand img {
    height: 40px;
}

.cp-brand-name {
    font-size: 18px;
    font-weight: 600;
}

.cp-header-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}

.cp-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 32px 20px 48px;
}

.cp-hero {
    text-align: center;
    margin-bottom: 28px;
}

.cp-hero h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.cp-hero p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.cp-card {
    width: 100%;
    max-width: 980px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.cp-card.cp-card-single {
    grid-template-columns: 1fr;
}

/* 无第三方登录区时：单栏表单保持窄卡片居中，避免拉满 980px */
.cp-card.cp-card-compact {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cp-main-inner {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}

.cp-left {
    padding: 40px 36px;
    border-right: 1px solid #eef2f7;
    background: linear-gradient(180deg, #fbfdff 0%, #f8fbff 100%);
}

.cp-left-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #0f172a;
}

.cp-left-apps {
    margin: 0 0 20px;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
}

.cp-left-guide {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border: 1px dashed #dbe4f0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
}

.cp-left-guide-default,
.cp-chaoran-third-panel {
    width: 100%;
}

.cp-left-guide-default p,
.cp-chaoran-third-panel p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

.cp-chaoran-third-panel .cp-scan-meta a,
.cp-chaoran-third-panel .chaoran-download-links a {
    color: #2563eb;
    text-decoration: none;
}

.cp-chaoran-third-panel .chaoran-download-tip,
.cp-left-guide-default .chaoran-download-tip {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #64748b;
}

.cp-chaoran-third-panel .chaoran-download-links,
.cp-chaoran-third-panel .cp-scan-meta.chaoran-download-links {
    margin-top: 8px;
}

.cp-qrcode-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cp-qrcode-wrap #qrcode,
.cp-scan-qrcode #qrcode,
.cp-scan-qrcode #chaoran_third_qrcode {
    box-sizing: border-box;
    width: 240px;
    height: 240px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e5edf7;
    border-radius: 12px;
    line-height: 0;
    font-size: 0;
}

.cp-qrcode-wrap #qrcode canvas,
.cp-qrcode-wrap #qrcode img,
.cp-scan-qrcode #qrcode canvas,
.cp-scan-qrcode #qrcode img,
.cp-scan-qrcode #chaoran_third_qrcode canvas,
.cp-scan-qrcode #chaoran_third_qrcode img {
    display: block;
    margin: 0 auto;
    padding: 0;
    border: 0;
    vertical-align: top;
    max-width: 100%;
    height: auto !important;
}

.cp-qrcode-wrap #qrcode:has(canvas) img,
.cp-scan-qrcode #qrcode:has(canvas) img,
.cp-scan-qrcode #chaoran_third_qrcode:has(canvas) img {
    display: none !important;
}

.cp-chaoran-scanned {
    padding: 12px 0 4px;
}

.cp-chaoran-scanned .oauth-qr-scanned-avatar {
    width: 120px;
    height: 120px;
}

.oauth-qr-scanned-dialog {
    padding-top: 4px;
}

.cp-qrcode-wrap p {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 13px;
}

.cp-other-title {
    margin-top: 24px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

.cp-third-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.cp-third-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #fff center/24px no-repeat;
    cursor: pointer;
    transition: all .2s ease;
}

.cp-third-btn:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.cp-third-btn.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.cp-right {
    padding: 32px 36px 28px;
}

.cp-right-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cp-tabs {
    display: flex;
    gap: 18px;
    border-bottom: 1px solid #e5edf7;
    margin-bottom: 24px;
}

.cp-tabs li {
    list-style: none;
    padding: 0 0 12px;
    margin: 0;
    font-size: 15px;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.cp-tabs li.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.cp-form-group {
    margin-bottom: 16px;
}

.cp-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #475569;
}

.cp-form-control {
    width: 100%;
    height: 42px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.cp-form-control:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cp-code-row {
    display: flex;
    gap: 10px;
}

.cp-code-row .cp-form-control {
    flex: 1;
}

.cp-kaptcha-btn {
    min-width: 118px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    cursor: pointer;
}

.cp-kaptcha-btn:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.cp-submit {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.cp-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.cp-links {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 13px;
}

.cp-links a {
    color: #2563eb;
    text-decoration: none;
}

.cp-error {
    color: #dc2626;
    font-size: 13px;
    text-align: center;
    margin: 8px 0;
}

.cp-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    margin: 12px 0;
}

.cp-footer {
    text-align: center;
    padding: 16px 20px 24px;
    color: #94a3b8;
    font-size: 12px;
}

.cp-footer a:not(.site-filing-link):not(.site-legal-link) {
    color: #64748b;
    text-decoration: none;
}

.cp-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cp-spin .8s linear infinite;
    vertical-align: middle;
}

@keyframes cp-spin {
    to { transform: rotate(360deg); }
}

.cp-scan-panel {
    text-align: center;
    padding: 4px 0 8px;
}

.cp-scan-qrcode {
    display: flex;
    justify-content: center;
}

.cp-scan-panel p {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 13px;
}

.cp-scan-meta {
    margin-top: 6px !important;
    font-size: 12px !important;
    color: #94a3b8 !important;
}

@media (max-width: 900px) {
    .cp-card {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    .cp-left {
        border-right: none;
        border-bottom: 1px solid #eef2f7;
        padding: 28px 24px;
    }
    .cp-right {
        padding: 24px;
    }
    .cp-left-guide {
        min-height: auto;
    }
}

.cp-field-error {
    color: #dc2626;
    font-size: 12px;
    margin: -6px 0 10px;
}

.cp-register-agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    margin: 12px 0;
    line-height: 1.5;
}

.cp-register-agree a {
    color: #2563eb;
    text-decoration: none;
}

.cp-register-agree-warn {
    font-size: 12px;
    color: #ea580c;
    margin: -4px 0 10px;
}

.cp-register-login-link {
    margin-top: 16px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

.cp-register-login-link a {
    color: #2563eb;
    text-decoration: none;
    margin-left: 4px;
}

.cp-page .auth-login-section {
    margin-top: 20px;
}

.cp-page .auth-login-divider {
    color: #94a3b8;
}

.cp-page .auth-login-divider::before,
.cp-page .auth-login-divider::after {
    background: #e2e8f0;
}

.cp-page .auth-login-item {
    color: #334155;
}

.cp-page .auth-login-item:hover,
.cp-page .auth-login-item:focus {
    background: #f1f5f9;
}
