/* ============================================
 * 认证页面公共样式 (login / register / forgot-password)
 * ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f5f3;
    position: relative;
    overflow: hidden;
}

/* 背景装饰圆 */
.login-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
}

.bg-circle-1 {
    width: 600px;
    height: 600px;
    background: #10b981;
    top: -200px;
    right: -100px;
}

.bg-circle-2 {
    width: 400px;
    height: 400px;
    background: #06b6d4;
    bottom: -100px;
    left: -50px;
}

.bg-circle-3 {
    width: 200px;
    height: 200px;
    background: #10b981;
    top: 40%;
    left: 30%;
}

/* 主容器 */
.login-container {
    display: flex;
    width: 900px;
    min-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 左侧品牌区 */
.login-brand {
    width: 420px;
    background: linear-gradient(160deg, #064e3b 0%, #022c22 50%, #0a1628 100%);
    padding: 60px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.login-brand::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.08);
}

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.brand-logo img {
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}

.brand-title {
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1;
}

.brand-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 32px;
}

.brand-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    line-height: 1.8;
}

/* 品牌区功能列表 */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
}

.feature-item i {
    color: rgba(16, 185, 129, 0.7);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 品牌区安全保障 */
.brand-security {
    margin-top: 32px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.security-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(16, 185, 129, 0.8);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.security-desc {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    line-height: 1.6;
}

/* 品牌区优势标签 */
.brand-tags {
    display: flex;
    gap: 12px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tag-item {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 10px;
    transition: all 0.15s;
}

.tag-item:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.tag-item i {
    font-size: 20px;
    color: rgba(16, 185, 129, 0.7);
    display: block;
    margin-bottom: 8px;
}

.tag-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

/* 品牌区版权 */
.brand-copyright {
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

.brand-copyright a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.brand-copyright a:hover {
    color: rgba(255, 255, 255, 0.5);
}

/* 品牌区注册须知 */
.brand-notice {
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
    line-height: 1.7;
}

/* 品牌区安全提示 */
.brand-tip {
    margin-top: 32px;
    padding: 14px 16px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.brand-tip i {
    color: rgba(16, 185, 129, 0.7);
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0;
}

.brand-tip span {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    line-height: 1.6;
}

/* 三步流程 */
.brand-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 8px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.step-icon i {
    color: #10b981;
    font-size: 16px;
}

.step-number {
    font-size: 11px;
    color: #10b981;
    font-weight: 700;
    margin-bottom: 4px;
}

.step-label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
}

.step-connector {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 2px;
    flex-shrink: 0;
}

.step-connector i {
    color: rgba(16, 185, 129, 0.3);
    font-size: 12px;
}

/* 密码要求 */
.brand-rules {
    margin-top: 24px;
}

.rules-title {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    margin-bottom: 10px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    margin-bottom: 6px;
}

.rule-item i {
    font-size: 10px;
    color: rgba(16, 185, 129, 0.4);
    width: 14px;
    text-align: center;
}

/* 右侧表单区 */
.login-form-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 56px;
}

.login-form-inner {
    width: 100%;
    max-width: 340px;
}

.form-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.form-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 28px;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group.has-error .form-control {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-group.has-error .form-control:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.has-error .form-icon {
    color: #ef4444;
}

.form-error {
    position: absolute;
    bottom: -18px;
    left: 0;
    font-size: 12px;
    color: #ef4444;
    display: none;
}

.form-group.has-error .form-error {
    display: block;
    animation: errorShake 0.3s ease-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-control {
    width: 100%;
    height: 44px;
    padding: 10px 14px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    transition: all 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    z-index: 1;
}

/* 短信验证码 */
.sms-group {
    display: flex;
    gap: 12px;
    position: relative;
}

.sms-group .form-control {
    flex: 1;
    padding-left: 40px;
}

.btn-send-sms {
    width: 120px;
    height: 44px;
    border: 1px solid #10b981;
    background: #fff;
    color: #10b981;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-send-sms:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.08);
}

.btn-send-sms:disabled {
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

/* 底部链接 */
.form-footer {
    display: flex;
    justify-content: flex-start;
    margin-top: 16px;
}

.footer-link {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-link:hover {
    color: #10b981;
}

/* Toast 提示 */
.toast-container {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 500px;
    padding: 16px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    animation: toastIn 0.3s ease-out;
    pointer-events: auto;
}

.toast.removing {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon.error { background: #fef2f2; color: #ef4444; }
.toast-icon.success { background: #ecfdf5; color: #059669; }
.toast-icon.warning { background: #fff7ed; color: #ea580c; }
.toast-icon.info { background: #eff6ff; color: #2563eb; }

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #1e293b;
}

/* 提交按钮（注册 / 忘记密码） */
.btn-submit {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-submit:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 响应式 - 平板 */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        width: 100%;
        max-width: 500px;
        margin: 20px;
        min-height: auto;
    }

    .login-brand {
        width: 100%;
        padding: 40px 32px;
    }

    .brand-features,
    .brand-tags,
    .brand-copyright,
    .brand-security,
    .brand-notice,
    .brand-steps,
    .brand-tip,
    .brand-rules {
        display: none;
    }

    .brand-desc {
        margin-bottom: 0;
    }

    .login-form-wrap {
        padding: 40px 32px;
    }
}

/* 响应式 - 手机 */
@media (max-width: 576px) {
    .login-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .login-brand {
        padding: 30px 24px;
    }

    .brand-title {
        font-size: 26px;
    }

    .login-form-wrap {
        padding: 30px 24px;
    }
}
