
body.auth-layout,
.auth-layout,
.auth-page {
    background: var(--bg-page) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body.auth-layout {
    background: var(--bg-primary, #020617) !important;
}

@media (max-width: 1024px) {
    body.auth-layout {
        --header-height: 56px;
    }
}

body.auth-layout .main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
    min-width: 0;
}
body.auth-layout .site-footer {
    margin-top: auto;
}

.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 顶栏 fixed：用变量留白，避免固定 100px + 垂直居中造成「大片空白」 */
    justify-content: flex-start;
    padding: calc(var(--header-height, 64px) + clamp(12px, 2.5vh, 28px)) var(--page-gutter-x, 16px) clamp(24px, 4vh, 48px);
    margin-top: 0;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
}

.auth-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

.auth-card-unified {
    display: flex;
    width: 100%;
    max-width: 100%;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    min-height: 0;
    box-sizing: border-box;
}

@media (min-width: 993px) {
    .auth-card-unified {
        min-height: 560px;
    }
}

.auth-form-side {
    flex: 1 1 360px;
    min-width: 0;
    padding: clamp(28px, 5vw, 60px) clamp(20px, 4vw, 50px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
}

.auth-header {
    text-align: left;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.2;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    margin: 0;
}

.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    padding: 5px;
    border-radius: 14px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.auth-tab-btn.active {
    background: var(--primary-color, #22c55e);
    color: #000;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.25);
}

.auth-tab-wrapper {
    position: relative;
    overflow: hidden;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 100%;
}

.auth-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.auth-tab-content.absolute-mode {
    position: absolute;
    top: 0;
    left: 0;
    display: block !important;
}

.auth-tab-content.relative-mode {
    position: relative;
    display: block !important;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-label i {
    margin-right: 6px;
    color: var(--primary-color);
    opacity: 0.8;
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 42px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #fff;
}

.auth-btn-primary {
    width: 100%;
    height: 54px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 12px;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 20px -4px rgba(34, 197, 94, 0.3);
    color: #000;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(34, 197, 94, 0.4);
}

.auth-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.auth-links-row{
    display:flex;
    flex-wrap: wrap;
    gap:12px 15px;
    justify-content: flex-end;
}

.forgot-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--primary-color);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 16px;
}

.social-login {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.social-btn {
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-brand-side {
    flex: 1 1 320px;
    min-width: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    position: relative;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.auth-brand-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
    z-index: 0;
}

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

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.feature-item-modern {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.feature-icon-modern {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary-color);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-text h3 {
    margin: 0 0 6px;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.feature-text p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

@media (max-width: 992px) {
    .auth-card-unified {
        flex-direction: column;
        min-height: auto;
    }
    
    .auth-brand-side {
        display: none;
    }
    
    .auth-form-side {
        padding: clamp(24px, 5vw, 40px) var(--page-gutter-x, 16px);
    }
    
    .auth-container {
        padding: 0;
    }
}

@media (max-width: 520px) {
    .auth-title {
        font-size: 1.45rem;
    }
    .auth-subtitle {
        font-size: 0.9rem;
    }
    .auth-tab-btn {
        font-size: 14px;
        padding: 10px 8px;
    }
}

/* ========== 邮箱验证页 /auth/verify-email（模板类名此前未在任何样式表中定义） ========== */
.verify-email-main {
    width: 100%;
}

.verify-email-container {
    width: 100%;
}

.verify-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 44px 48px 52px;
    max-width: 1100px;
    margin: 0 auto;
}

.verify-status-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 22px;
    text-align: center;
    color: var(--primary-color, #22c55e);
}

.verify-card.verify-state-success .verify-status-icon {
    color: #22c55e;
}

.verify-card.verify-state-expired .verify-status-icon {
    color: #f59e0b;
}

.verify-card.verify-state-invalid .verify-status-icon {
    color: #ef4444;
}

.verify-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    margin: 0 0 14px;
    line-height: 1.25;
}

.verify-description {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1rem;
    line-height: 1.65;
    text-align: center;
    margin: 0 auto 36px;
    max-width: 640px;
}

.verify-description strong {
    color: #ffffff;
}

.verify-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px 48px;
    align-items: start;
}

.verify-layout-left {
    min-width: 0;
}

.verify-layout-right {
    min-width: 0;
    padding-top: 4px;
}

.verify-steps {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.verify-step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    opacity: 0.88;
}

.verify-step.active {
    opacity: 1;
}

.verify-step .step-index {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color, #22c55e);
}

.verify-step.active .step-index {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.35);
}

.verify-step .step-body h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
}

.verify-step .step-body p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.55;
}

.verify-step .step-body p.verify-mail-hint {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.45;
}

.verify-admin-qr-btn {
    margin-top: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.verify-admin-qr-btn:hover {
    background: rgba(34, 197, 94, 0.22);
    color: #bbf7d0;
}

.verify-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(8px);
}

.verify-qr-modal[hidden] {
    display: none;
}

.verify-qr-modal-card {
    position: relative;
    width: min(420px, 100%);
    padding: 28px 28px 32px;
    border-radius: 24px;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.verify-qr-modal-card h2 {
    margin: 0 40px 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.verify-qr-modal-card h2 .fa-weixin {
    color: #22c55e;
    margin-right: 8px;
}

.verify-qr-modal-card p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.95rem;
    line-height: 1.5;
}

.verify-qr-plate {
    display: inline-flex;
    padding: 16px;
    background: #ffffff;
    border-radius: 18px;
    line-height: 0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.verify-qr-plate img {
    width: 260px;
    height: 260px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    background: #ffffff;
    border-radius: 8px;
}

.verify-qr-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

.verify-qr-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.verify-form label {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.code-input-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.code-input-group input[type="text"] {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.2rem;
    letter-spacing: 0.35em;
    text-align: center;
    box-sizing: border-box;
}

.code-input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color, #22c55e);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.verify-divider {
    display: flex;
    align-items: center;
    margin: 26px 0;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
}

.verify-divider::before,
.verify-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.verify-divider span {
    padding: 0 14px;
}

.resend-block {
    margin-bottom: 22px;
}

.resend-block p {
    margin: 0 0 14px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.verify-help {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    line-height: 1.6;
}

.verify-help a {
    color: var(--primary-color, #22c55e);
    text-decoration: none;
}

.verify-help a:hover {
    text-decoration: underline;
}

.verify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 12px;
}

.verify-actions .auth-btn-primary,
.verify-actions .auth-btn-secondary {
    width: auto;
    flex: 1 1 160px;
    margin-top: 0;
    text-decoration: none;
}

a.auth-btn-primary,
a.auth-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-btn-secondary {
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
}

@media (max-width: 992px) {
    .verify-card {
        padding: 32px 22px 40px;
    }

    .verify-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .verify-layout-right {
        order: -1;
        padding-top: 0;
    }
}
