/* RockPPT authentication */

html:has(body.rock-auth-page) {
    height: 100%;
    overflow: hidden;
}

body.rock-auth-page {
    margin: 0;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    position: relative;
    background: #f6faf7;
    color: #121615;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.rock-auth-page .rock-slides-header {
    height: var(--rs-header-height, 68px);
    min-height: var(--rs-header-height, 68px);
    box-sizing: border-box;
}

body.rock-auth-page::before {
    content: "";
    position: fixed;
    inset: var(--rs-header-height, 68px) 0 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(52, 125, 94, 0.1) 0 1px, transparent 1px 100%),
        linear-gradient(180deg, rgba(52, 125, 94, 0.08) 0 1px, transparent 1px 100%),
        linear-gradient(180deg, rgba(45, 117, 91, 0.1) 0, rgba(45, 117, 91, 0.025) 240px, transparent 560px),
        repeating-linear-gradient(135deg, rgba(41, 82, 74, 0.03) 0 1px, transparent 1px 38px),
        linear-gradient(115deg, #f5fbf7 0%, #fff 45%, #fbf7ed 100%);
    background-size:
        72px 72px,
        72px 72px,
        auto,
        auto,
        auto;
}

body.rock-auth-page::after {
    content: "";
    position: fixed;
    inset: var(--rs-header-height, 68px) 0 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.78), rgba(230, 244, 236, 0.52)) right 8vw top 18vh / 430px 242px no-repeat,
        linear-gradient(140deg, rgba(255, 255, 255, 0.65), rgba(244, 238, 222, 0.48)) right 18vw bottom 13vh / 330px 186px no-repeat,
        linear-gradient(140deg, rgba(255, 255, 255, 0.62), rgba(225, 241, 235, 0.42)) left 10vw bottom 16vh / 380px 214px no-repeat;
    opacity: 0.58;
    mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}

.rock-auth-container {
    position: relative;
    z-index: 1;
    min-height: calc(100svh - var(--rs-header-height, 68px));
    display: grid;
    grid-template-columns: minmax(0, 500px) minmax(380px, 420px);
    gap: clamp(44px, 6vw, 78px);
    align-items: center;
    justify-content: center;
    max-width: 1060px;
    width: min(100% - 48px, 1060px);
    margin: 0 auto;
    padding: clamp(48px, 8vh, 82px) 0 clamp(52px, 8vh, 88px);
    box-sizing: border-box;
    color: #101716;
}

.rock-auth-container::before,
.rock-auth-container::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border: 1px solid rgba(43, 91, 80, 0.1);
    border-radius: 18px;
    background:
        linear-gradient(90deg, rgba(48, 111, 92, 0.09) 0 1px, transparent 1px 100%),
        linear-gradient(180deg, rgba(48, 111, 92, 0.08) 0 1px, transparent 1px 100%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(238, 247, 241, 0.48));
    background-size: 52px 52px, 52px 52px, auto;
    box-shadow: 0 26px 80px rgba(43, 73, 65, 0.08);
}

.rock-auth-container::before {
    width: min(34vw, 520px);
    aspect-ratio: 16 / 9;
    right: -18vw;
    top: 14vh;
    transform: rotate(-8deg);
}

.rock-auth-container::after {
    width: min(25vw, 360px);
    aspect-ratio: 16 / 9;
    left: -15vw;
    bottom: 12vh;
    transform: rotate(7deg);
}

@supports not (height: 100svh) {
    body.rock-auth-page {
        height: 100vh;
        min-height: 100vh;
    }

    .rock-auth-container {
        min-height: calc(100vh - var(--rs-header-height, 68px));
    }
}

.auth-product-panel {
    max-width: 500px;
    padding: clamp(18px, 3vh, 30px) 0;
}

.auth-eyebrow {
    margin: 0 0 12px;
    color: #3e736d;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: none;
}

.auth-product-panel h1 {
    margin: 0;
    max-width: 500px;
    color: #101716;
    font-size: clamp(38px, 4.6vw, 52px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0;
}

.auth-product-panel > p {
    max-width: 460px;
    margin: 18px 0 0;
    color: #66716f;
    font-size: 15px;
    line-height: 1.9;
}

.auth-benefit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 34px;
    max-width: 460px;
    border-top: 1px solid rgba(18, 43, 40, 0.11);
    border-bottom: 1px solid rgba(18, 43, 40, 0.11);
}

.auth-benefit-grid div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    min-height: auto;
    padding: 15px 0;
    border: 0;
    border-top: 1px solid rgba(18, 43, 40, 0.08);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.auth-benefit-grid div:first-child {
    border-top: 0;
}

.auth-benefit-grid strong,
.auth-benefit-grid span {
    display: block;
}

.auth-benefit-grid strong {
    color: #101716;
    font-size: 14px;
    font-weight: 900;
}

.auth-benefit-grid span {
    margin-top: 0;
    color: #73807d;
    font-size: 13px;
    line-height: 1.55;
}

.rock-auth-box {
    width: 100%;
    padding: 30px;
    border: 1px solid rgba(18, 43, 40, 0.11);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 26px 72px rgba(38, 54, 50, 0.12);
    backdrop-filter: blur(16px);
}

.auth-header {
    margin-bottom: 20px;
}

.auth-header h2 {
    margin: 0;
    color: #101716;
    font-size: 25px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: 0;
}

.auth-header p {
    margin: 10px 0 0;
    color: #73807d;
    font-size: 14px;
    line-height: 1.55;
}

.auth-method-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 4px;
    margin: 0 0 22px;
    padding: 4px;
    border: 1px solid rgba(18, 43, 40, 0.08);
    border-radius: 10px;
    background: #f2f6f4;
}

.auth-method-tab {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #66716f;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.auth-method-tab:hover {
    color: #101716;
}

.auth-method-tab.is-active {
    background: #fff;
    color: #101716;
    box-shadow: 0 8px 22px rgba(30, 48, 44, 0.08);
}

.auth-method-panel {
    display: none;
}

.auth-method-panel.is-active {
    display: block;
}

.auth-method-note {
    margin: 12px 0 0;
    color: #73807d;
    font-size: 12px;
    line-height: 1.65;
}

.auth-wechat-panel {
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 8px 0 2px;
}

.auth-wechat-qr {
    display: flex;
    width: 214px;
    height: 214px;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid rgba(18, 43, 40, 0.1);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 248, 0.96)),
        #fff;
    box-shadow: 0 18px 40px rgba(31, 57, 50, 0.11);
    box-sizing: border-box;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.auth-wechat-qr:hover {
    transform: translateY(-1px);
    border-color: rgba(34, 180, 85, 0.28);
    box-shadow: 0 22px 48px rgba(31, 57, 50, 0.15);
}

.auth-wechat-qr.is-placeholder {
    cursor: default;
    pointer-events: none;
}

.auth-wechat-qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

.auth-wechat-copy {
    text-align: center;
}

.auth-wechat-copy strong,
.auth-wechat-copy span {
    display: block;
}

.auth-wechat-copy strong {
    color: #101716;
    font-size: 16px;
    font-weight: 950;
}

.auth-wechat-copy span {
    max-width: 310px;
    margin-top: 8px;
    color: #73807d;
    font-size: 12px;
    line-height: 1.6;
}

.auth-social-stack {
    margin-bottom: 0;
}

.auth-alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.auth-alert-error {
    border: 1px solid #f1c6c1;
    background: #fff1ef;
    color: #9b2c21;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(20, 124, 74, 0.2);
    border-radius: 8px;
    background: #ecf9f1;
    color: #0f6b3d;
    text-decoration: none;
    font-size: 15px;
    font-weight: 900;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-social-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(20, 124, 74, 0.34);
    box-shadow: 0 14px 30px rgba(30, 100, 69, 0.12);
}

.auth-social-btn.is-disabled {
    cursor: default;
    opacity: 0.58;
    pointer-events: none;
}

.auth-social-mark {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #18a45b;
}

.auth-social-mark svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.auth-social-note {
    margin: 8px 0 0;
    color: #7b8583;
    font-size: 12px;
    line-height: 1.5;
}

.auth-phone-form {
    margin-bottom: 0;
}

.auth-bind-banner {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid rgba(58, 116, 107, 0.18);
    border-radius: 8px;
    background: #f2f8f6;
    color: #315f58;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 700;
}

.phone-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px;
    gap: 10px;
}

.auth-code-btn {
    min-height: 48px;
    border: 1px solid rgba(18, 43, 40, 0.14);
    border-radius: 8px;
    background: #f6f8f7;
    color: #315f58;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.auth-code-btn:hover {
    border-color: rgba(58, 116, 107, 0.38);
    background: #eef5f2;
}

.auth-code-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #8a9491;
    font-size: 12px;
    font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(18, 43, 40, 0.1);
}

.rock-auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #3c4845;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(18, 43, 40, 0.14);
    border-radius: 8px;
    background: #fff;
    color: #101716;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    appearance: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-group input::placeholder {
    color: #9aa4a1;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(58, 116, 107, 0.58);
    box-shadow: 0 0 0 4px rgba(58, 116, 107, 0.11);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 4px 0 18px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: #63716d;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #315f58;
    cursor: pointer;
}

.role-select {
    padding: 13px 14px;
    border: 1px solid rgba(18, 43, 40, 0.1);
    border-radius: 8px;
    background: #f8faf8;
}

.forgot-link,
.auth-footer a {
    color: #315f58;
    text-decoration: none;
    font-weight: 900;
}

.forgot-link:hover,
.auth-footer a:hover {
    color: #101716;
}

.form-message {
    display: none;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.form-message.show {
    display: block;
}

.form-message.success {
    border: 1px solid #b9e6ca;
    background: #eefaf3;
    color: #17613c;
}

.form-message.error {
    border: 1px solid #f1c6c1;
    background: #fff1ef;
    color: #9b2c21;
}

.auth-submit-btn {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #101716;
    color: #fff;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    background: #1b2926;
    box-shadow: 0 16px 34px rgba(16, 23, 22, 0.2);
}

.auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-submit-btn.loading {
    position: relative;
    color: transparent;
}

.auth-submit-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
}

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

.auth-footer {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(18, 43, 40, 0.08);
    text-align: center;
}

.auth-footer p {
    margin: 0;
    color: #73807d;
    font-size: 13px;
}

.form-group input.error {
    border-color: #d65447;
    box-shadow: 0 0 0 4px rgba(214, 84, 71, 0.12);
}

@media (max-width: 980px) {
    html:has(body.rock-auth-page) {
        height: auto;
        overflow: auto;
    }

    body.rock-auth-page {
        height: auto;
        overflow-y: auto;
    }

    .rock-auth-container {
        grid-template-columns: 1fr;
        min-height: auto;
        width: min(100% - 28px, 680px);
        padding: 36px 0 64px;
    }

    .rock-auth-container::before,
    .rock-auth-container::after {
        display: none;
    }

    .auth-product-panel {
        max-width: none;
    }

    .auth-product-panel h1 {
        font-size: clamp(34px, 9vw, 48px);
    }

    .auth-benefit-grid {
        grid-template-columns: 1fr;
        max-width: none;
    }
}

@media (max-height: 760px) {
    html:has(body.rock-auth-page) {
        height: auto;
        overflow: auto;
    }

    body.rock-auth-page {
        height: auto;
        overflow-y: auto;
    }

    .rock-auth-container {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .rock-auth-box {
        box-sizing: border-box;
        padding: 22px;
    }

    .auth-method-tabs {
        grid-template-columns: 1fr;
    }

    .auth-benefit-grid div {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .auth-wechat-qr {
        width: min(214px, 72vw);
        height: min(214px, 72vw);
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .phone-code-row {
        grid-template-columns: 1fr;
    }
}
