/* pyWork Auth Styles - 认证页面样式 */

/* CSS Variables */
:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --green-primary: #10b981;
    --green-dark: #059669;
    --gray-100: #f3f4f6;
}

/* 认证页面布局 */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.auth-container {
    width: 100%;
    max-width: 520px;
}

/* Logo */
.auth-logo {
    display: block;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-decoration: none;
}

.auth-logo:hover {
    text-decoration: none;
}

/* 认证卡片 - 加宽到560px */
.auth-card {
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-title .logo-text {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-title .logo-text:hover {
    text-decoration: underline;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* 表单基础样式 */
.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--bg-color);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* 表单选项 */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

.link {
    color: var(--primary-color);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* 按钮 */
.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* 底部链接 */
.auth-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

/* 社交登录 */
.social-auth {
    text-align: center;
}

.divider {
    position: relative;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 2rem);
    height: 1px;
    background: var(--border-color);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: transparent;
    padding: 0 1rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-social {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-social:hover {
    background: var(--bg-secondary);
    text-decoration: none;
}

/* 成功提示 */
.success-message {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: var(--green-dark);
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* 验证码样式 */
.captcha-group {
    margin-bottom: 20px;
}

.captcha-input-wrap {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input-wrap input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 40px;
    box-sizing: border-box;
}

.captcha-img {
    width: 100px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--gray-100);
    object-fit: contain;
}

.captcha-img:hover {
    border-color: var(--green-primary);
}

/* 紧凑表单布局 - 两列 */
.compact-form .form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.compact-form .form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.compact-form .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.compact-form .form-group input {
    padding: 10px 12px;
    font-size: 14px;
}

.compact-form .form-hint {
    font-size: 12px;
    margin-top: 2px;
}

/* 行内表单布局 - label和input在同一行 */
.inline-form .inline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.inline-form .inline-row label {
    width: 80px;
    flex-shrink: 0;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    text-align: right;
}

.inline-form .inline-row input {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
}

/* 验证码图片行 */
.captcha-image-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 92px;  /* 80px label宽度 + 12px gap */
    margin-bottom: 16px;
}

.captcha-image-row .captcha-img {
    width: 100px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--gray-100);
    object-fit: contain;
}

.captcha-image-row .captcha-img:hover {
    border-color: var(--green-primary);
}

.captcha-image-row .form-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 行内选项布局 - checkbox与上方label对齐 */
.inline-options {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.inline-options .checkbox-spacer {
    width: 70px;
    flex-shrink: 0;
}

.inline-options .checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 14px;
}

.inline-options .checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
    }

    .compact-form .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .inline-form .inline-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .inline-form .inline-row label {
        width: auto;
        text-align: left;
    }

    .inline-form .inline-row input {
        width: 100%;
    }

    .captcha-image-row {
        margin-left: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .inline-options {
        flex-direction: column;
    }

    .inline-options .checkbox-spacer {
        display: none;
    }

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

    .social-buttons {
        flex-direction: column;
    }
}
