/* login/css/index.css */
/* 登录页专属样式 */

.ix-login-page {
    min-height: 100vh;
    background-color: #F8FAFC;
    background-image: radial-gradient(#E2E8F0 1px, transparent 1px);
    background-size: 20px 20px;
    color: #1E293B;
}

.login-shell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 920px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 20px 22px;
}

/* =========================================
   1. 顶栏与页脚
   ========================================= */
.login-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    color: #64748B;
    font-size: 12px;
}
.login-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #64748B;
    text-decoration: none;
    transition: color 0.2s;
}
.login-back:hover {
    color: #E63946;
}
.login-back .fa-solid {
    font-size: 10px;
}
.login-languages {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.login-languages a {
    color: #94A3B8;
    text-decoration: none;
    letter-spacing: 0.08em;
    transition: color 0.2s;
}
.login-languages a:hover,
.login-languages a.is-current {
    color: #334155;
}
.login-languages a.is-current {
    font-weight: 700;
}
.login-page-foot {
    margin: 18px 0 0;
    color: #94A3B8;
    font-size: 11px;
    text-align: center;
}
.login-page-foot a {
    color: #64748B;
    text-decoration: none;
}
.login-page-foot a:hover {
    color: #E63946;
}

/* =========================================
   2. 登录卡片
   ========================================= */
.login-card {
    display: flex;
    width: 100%;
    overflow: hidden;
    border: 1px solid #EFF2F6;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 24px 50px -24px rgba(15, 23, 42, 0.22), 0 8px 18px -12px rgba(15, 23, 42, 0.1);
}
.login-card--narrow {
    max-width: 480px;
    margin: 0 auto;
}
.login-left {
    flex: 1.08;
    padding: 44px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-right {
    flex: 0.92;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 38px;
    border-left: 1px solid #E2E8F0;
    background: #F8FAFC;
}

.login-brand {
    margin-bottom: 30px;
}
.login-brand > a {
    display: inline-flex;
    align-items: center;
}
.login-logo {
    display: block;
    width: auto;
    height: 30px;
    max-width: 100%;
    object-fit: contain;
}
.login-tagline {
    margin: 9px 0 0;
    color: #94A3B8;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.login-title {
    margin: 0 0 7px;
    color: #0F172A;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
}
.login-subtitle {
    margin: 0 0 18px;
    color: #64748B;
    font-size: 13px;
    line-height: 1.6;
}

.login-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    border-radius: 10px;
    background: #F1F5F9;
}
.login-tab {
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #64748B;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.login-tab:hover {
    color: #334155;
}
.login-tab.is-active {
    background: #FFFFFF;
    color: #E63946;
    font-weight: 600;
    box-shadow: 0 2px 8px -4px rgba(15, 23, 42, 0.28);
}
.login-pane[hidden] {
    display: none;
}
.login-pane-note {
    margin: 0 0 14px;
    color: #94A3B8;
    font-size: 12px;
    line-height: 1.6;
}
.login-mode-link {
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #E63946;
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}
.login-mode-link:hover {
    text-decoration: underline;
}

/* =========================================
   3. 邮箱验证码 / 密码表单
   ========================================= */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.login-field {
    width: 100%;
}
.login-input-wrap {
    position: relative;
    width: 100%;
}
.login-input {
    width: 100%;
    height: 46px;
    padding: 0 16px 0 42px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    color: #1E293B;
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.login-input::placeholder {
    color: #94A3B8;
}
.login-input:focus {
    border-color: #E63946;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}
.login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 14px;
    pointer-events: none;
}
.login-code-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.login-input-wrap--code {
    flex: 1;
    min-width: 0;
}
.login-code-btn {
    flex-shrink: 0;
    height: 46px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #F1F5F9;
    color: #475569;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.login-code-btn:hover:not(:disabled) {
    background: #E8EEF7;
    color: #1E293B;
}
.login-code-btn:disabled {
    color: #94A3B8;
    cursor: not-allowed;
    opacity: 0.75;
}

.login-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #64748B;
    font-size: 12px;
    line-height: 1.65;
}
.login-consent input {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin: 3px 0 0;
    accent-color: #E63946;
    cursor: pointer;
}
.login-consent__text label {
    cursor: pointer;
}
.login-legal-link {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: #E63946;
    font: inherit;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.login-legal-link:hover {
    text-decoration: underline;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    margin-top: 2px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: #E63946;
    color: #FFFFFF;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 20px -12px rgba(230, 57, 70, 0.8);
    transition: background-color 0.2s, transform 0.2s;
}
.login-submit:hover {
    background: #D62839;
    transform: translateY(-1px);
}
.login-submit:disabled {
    background: #FCA5A5;
    cursor: not-allowed;
    transform: none;
}
.login-submit--link {
    width: auto;
    padding: 0 22px;
    margin-top: 0;
}

.login-form .form-message {
    min-height: 18px;
    margin: -2px 0 0;
    font-size: 12px;
    line-height: 1.5;
}
.login-form .form-message.is-error {
    color: #DC2626;
}
.login-form .form-message.is-success {
    color: #059669;
}
.login-notice,
.login-dev-notice {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    background: #FFFBEB;
    color: #92400E;
    font-size: 12px;
    line-height: 1.6;
}
.login-dev-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-color: #BFDBFE;
    background: #EFF6FF;
    color: #1D4ED8;
}
.login-dev-notice .fa-solid {
    margin-top: 2px;
    font-size: 11px;
}
.login-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 16px 0 0;
    color: #94A3B8;
    font-size: 11px;
    line-height: 1.65;
}
.login-note .fa-solid {
    margin-top: 2px;
    color: #CBD5E1;
    font-size: 10px;
}

.login-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}
.login-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 18px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #FFFFFF;
    color: #64748B;
    font-size: 14px;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.login-secondary:hover {
    border-color: #CBD5E1;
    color: #1E293B;
}

/* =========================================
   4. 微信扫码区域
   ========================================= */
.login-wechat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}
.login-wechat-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    background: #E8F8EF;
    color: #07C160;
    font-size: 17px;
}
.login-wechat-head h2 {
    margin: 0;
    color: #1E293B;
    font-size: 18px;
    font-weight: 700;
}
.login-wechat-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 168px;
    height: 168px;
    margin: 0 auto 22px;
    overflow: hidden;
    border: 1px solid #E8EEF7;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 6px 16px -10px rgba(15, 23, 42, 0.18);
}
.login-wechat-visual::before,
.login-wechat-visual::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: #DCE6F4;
    border-style: solid;
}
.login-wechat-visual::before {
    top: 13px;
    left: 13px;
    border-width: 2px 0 0 2px;
    border-radius: 5px 0 0;
}
.login-wechat-visual::after {
    right: 13px;
    bottom: 13px;
    border-width: 0 2px 2px 0;
    border-radius: 0 0 5px;
}
.login-wechat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 9999px;
    background: #E8F8EF;
    color: #07C160;
    font-size: 30px;
}
.login-wechat-caption {
    margin-top: 12px;
    color: #07C160;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
}
.login-wechat-visual.is-disabled {
    border: 1.5px dashed #CBD5E1;
    background: #FBFCFE;
    box-shadow: none;
}
.login-wechat-visual.is-disabled::before,
.login-wechat-visual.is-disabled::after {
    border-color: #E2E8F0;
}
.login-wechat-visual.is-disabled .login-wechat-icon {
    background: #F1F5F9;
    color: #94A3B8;
}
.login-wechat-status {
    margin-top: 12px;
    padding: 2px 9px;
    border-radius: 9999px;
    background: #F1F5F9;
    color: #64748B;
    font-size: 11px;
}
.login-wechat-desc {
    max-width: 240px;
    margin: 0;
    color: #64748B;
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}
.login-wechat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    margin-top: 18px;
    padding: 0 20px;
    border-radius: 9px;
    background: #07C160;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}
.login-wechat-btn:hover {
    background: #06AD56;
}
.login-wechat-note {
    margin: 10px 0 0;
    color: #94A3B8;
    font-size: 11px;
    text-align: center;
}

/* =========================================
   5. 协议弹窗
   ========================================= */
.ix-modal-open {
    overflow: hidden;
}
.legal-modal {
    width: min(760px, calc(100vw - 32px));
    max-height: min(84vh, 820px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: #FFFFFF;
    color: #1E293B;
    box-shadow: 0 30px 70px -30px rgba(15, 23, 42, 0.55);
}
.legal-modal::backdrop {
    background: rgba(15, 23, 42, 0.54);
    backdrop-filter: blur(2px);
}
.legal-modal[open] {
    animation: legal-modal-in 0.2s ease-out;
}
@keyframes legal-modal-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.legal-modal__panel {
    display: flex;
    flex-direction: column;
    max-height: inherit;
}
.legal-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 20px;
    padding: 22px 26px 18px;
    border-bottom: 1px solid #EFF2F6;
    background: #FFFFFF;
}
.legal-modal__eyebrow {
    color: #E63946;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
}
.legal-modal__head h2 {
    margin: 6px 0 0;
    color: #0F172A;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
}
.legal-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid #E2E8F0;
    border-radius: 9999px;
    background: #FFFFFF;
    color: #64748B;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.legal-modal__close:hover {
    border-color: #FADBDD;
    background: #FFF5F5;
    color: #E63946;
}
.legal-modal__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 22px 28px 28px;
    color: #334155;
    font-size: 14px;
    line-height: 1.85;
    overscroll-behavior: contain;
}
.legal-modal__body > *:first-child {
    margin-top: 0;
}
.legal-modal__body h2,
.legal-modal__body h3,
.legal-modal__body h4 {
    margin: 26px 0 10px;
    color: #1E293B;
    line-height: 1.45;
}
.legal-modal__body h2 {
    font-size: 18px;
}
.legal-modal__body h3 {
    font-size: 16px;
}
.legal-modal__body h4 {
    font-size: 14px;
}
.legal-modal__body p {
    margin: 0 0 14px;
}
.legal-modal__body ul,
.legal-modal__body ol {
    margin: 0 0 16px;
    padding-left: 1.5em;
}
.legal-modal__body ul {
    list-style: disc;
}
.legal-modal__body ol {
    list-style: decimal;
}
.legal-modal__body li {
    margin: 5px 0;
}
.legal-modal__body a {
    color: #E63946;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal-modal__body strong {
    color: #1E293B;
}
.legal-modal__body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.legal-modal__body blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 3px solid #E63946;
    border-radius: 0 6px 6px 0;
    background: #F8FAFC;
}
.legal-modal__foot {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    padding: 13px 26px 16px;
    border-top: 1px solid #EFF2F6;
    background: #F8FAFC;
}
.legal-modal__done {
    height: 38px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    background: #E63946;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.legal-modal__done:hover {
    background: #D62839;
    color: #FFFFFF;
}
@media (prefers-reduced-motion: reduce) {
    .legal-modal[open] {
        animation: none;
    }
}

/* =========================================
   6. 响应式
   ========================================= */
@media (max-width: 1023px) {
    .login-shell {
        max-width: 820px;
    }
    .login-left {
        padding: 38px 34px;
    }
    .login-right {
        padding: 38px 30px;
    }
}

@media (max-width: 767px) {
    .login-shell {
        justify-content: flex-start;
        min-height: 100vh;
        padding: 18px 14px 20px;
    }
    .login-topbar {
        margin-bottom: 14px;
    }
    .login-card {
        flex-direction: column;
        border-radius: 16px;
    }
    .login-left {
        padding: 30px 24px;
    }
    .login-right {
        padding: 28px 24px 30px;
        border-top: 1px solid #E2E8F0;
        border-left: 0;
    }
    .login-brand {
        margin-bottom: 24px;
    }
    .login-title {
        font-size: 21px;
    }
    .login-wechat-head {
        margin-bottom: 20px;
    }
    .login-wechat-visual {
        width: 138px;
        height: 138px;
        margin-bottom: 18px;
    }
    .login-wechat-icon {
        width: 52px;
        height: 52px;
        font-size: 25px;
    }
    .login-page-foot {
        margin-top: 14px;
    }
    .legal-modal {
        width: calc(100vw - 20px);
        max-height: 88vh;
        border-radius: 14px;
    }
    .legal-modal__head {
        padding: 18px 20px 15px;
    }
    .legal-modal__head h2 {
        font-size: 19px;
    }
    .legal-modal__body {
        padding: 18px 20px 22px;
        font-size: 13px;
    }
    .legal-modal__foot {
        padding: 12px 20px 14px;
    }
    .legal-modal__done {
        height: 40px;
        width: 100%;
    }
}

@media (max-width: 380px) {
    .login-shell {
        padding-inline: 10px;
    }
    .login-left,
    .login-right {
        padding-inline: 20px;
    }
    .login-input {
        font-size: 13px;
    }
    .login-code-btn {
        padding: 0 11px;
        font-size: 12px;
    }
    .login-actions {
        width: 100%;
    }
    .login-actions .login-submit,
    .login-actions .login-secondary {
        width: 100%;
    }
}
