/* ibooking 认证页面样式 - 左右结构扁平化设计 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

/* 主容器 - 左右结构 */
.auth-container {
    display: flex;
    min-height: 100vh;
}

/* 左侧品牌区 */
.auth-brand {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.auth-brand::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
}

/* 品牌头部区域 - 横向布局 */
.brand-header-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo svg {
    width: 48px;
    height: 48px;
}

.brand-text {
    flex: 1;
}

.brand-name {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: 1px;
    line-height: 1.2;
}

.brand-slogan {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 致酒店朋友们 */
.brand-message {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-message h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
    letter-spacing: 0.5px;
}

.brand-message p {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.92;
    margin-bottom: 16px;
    text-align: justify;
    text-indent: 2em;
}

.brand-message p:last-of-type {
    margin-bottom: 0;
}

.brand-message strong {
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.brand-team {
    text-align: right;
    font-style: italic;
    margin-top: 20px;
    opacity: 0.85;
    font-size: 13px;
    font-weight: 500;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    opacity: 0.95;
}

.feature-item svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.brand-footer {
    position: relative;
    z-index: 1;
}

.brand-footer p {
    font-size: 14px;
    opacity: 0.7;
}

/* 右侧表单区 */
.auth-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fff;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 15px;
    color: #6b7280;
}

/* 登录方式切换 */
.login-type-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.tab-btn.active {
    background: #fff;
    color: #1890ff;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.label-hint {
    font-weight: 400;
    color: #9ca3af;
    font-size: 12px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    color: #1f2937;
    transition: all 0.2s;
    background: #fff;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.input-wrapper input::placeholder {
    color: #9ca3af;
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #6b7280;
}

/* 密码强度 */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.strength-bar.weak span {
    width: 33%;
    background: #ef4444;
}

.strength-bar.medium span {
    width: 66%;
    background: #f59e0b;
}

.strength-bar.strong span {
    width: 100%;
    background: #10b981;
}

.strength-text {
    font-size: 12px;
    color: #6b7280;
    min-width: 40px;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-label input:checked + .checkmark {
    background: #1890ff;
    border-color: #1890ff;
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.forgot-link {
    font-size: 14px;
    color: #1890ff;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* 服务条款 */
.terms-group {
    margin-bottom: 24px;
}

.terms-group .checkbox-label {
    align-items: flex-start;
}

.terms-group .checkbox-label span:last-child {
    line-height: 1.5;
}

.terms-group a {
    color: #1890ff;
    text-decoration: none;
}

.terms-group a:hover {
    text-decoration: underline;
}

/* 错误提示 */
.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.form-error.show {
    display: block;
}

/* 成功提示 */
.form-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #059669;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-success.hidden {
    display: none;
}

/* 按钮 */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
}

.btn-loading.hidden {
    display: none;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 底部链接 */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    font-size: 14px;
    color: #6b7280;
}

.auth-footer a {
    color: #1890ff;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 响应式优化 - 完善的设备适配 */

/* 大屏桌面 (1440px+) */
@media (min-width: 1440px) {
    .auth-brand {
        flex: 0 0 50%;
        padding: 80px;
    }
    
    .brand-name {
        font-size: 42px;
    }
    
    .brand-slogan {
        font-size: 20px;
    }
    
    .auth-form-container {
        max-width: 480px;
    }
}

/* 标准桌面 (1200px-1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .auth-brand {
        flex: 0 0 45%;
        padding: 60px;
    }
    
    .brand-name {
        font-size: 36px;
    }
    
    .brand-slogan {
        font-size: 18px;
    }
}

/* 小屏桌面和大屏平板 (1025px-1199px) */
@media (min-width: 1025px) and (max-width: 1199px) {
    .auth-brand {
        flex: 0 0 42%;
        padding: 50px;
    }
    
    .brand-name {
        font-size: 32px;
    }
    
    .brand-slogan {
        font-size: 17px;
    }
    
    .auth-form-container {
        max-width: 450px;
    }
}

/* 11寸平板专用优化 (768px-1024px) - 重点优化区域 */
@media (min-width: 768px) and (max-width: 1024px) {
    .auth-container {
        padding: 0;
    }
    
    .auth-brand {
        flex: 0 0 35%;
        padding: 40px 32px;
    }
    
    .brand-name {
        font-size: 28px;
    }
    
    .brand-slogan {
        font-size: 16px;
        margin-bottom: 32px;
    }
    
    .auth-form-wrapper {
        padding: 40px 32px;
    }
    
    .auth-form-container {
        max-width: 520px !important;
        margin: 0 auto;
    }
    
    /* 修复勾选框布局 - 确保在左侧 */
    .terms-group .checkbox-label {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 12px;
    }
    
    .terms-group .checkmark {
        order: -1;
        margin-right: 0;
        margin-top: 2px;
        flex-shrink: 0;
    }
    
    .terms-group .checkbox-label span:last-child {
        flex: 1;
        line-height: 1.5;
    }
    
    /* 注册表单网格布局优化 */
    .register-form-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px 20px;
    }
    
    /* 平板竖屏时的特殊处理 */
    @media (orientation: portrait) {
        .auth-container {
            flex-direction: column;
        }
        
        .auth-brand {
            flex: none;
            min-height: 180px;
            padding: 32px;
        }
        
        .brand-features {
            display: none;
        }
        
        .brand-footer {
            display: none;
        }
        
        .register-form-grid {
            grid-template-columns: 1fr !important;
            gap: 16px;
        }
    }
    
    /* 平板横屏时保持左右布局 */
    @media (orientation: landscape) {
        .auth-container {
            flex-direction: row;
        }
        
        .register-form-grid {
            grid-template-columns: 1fr 1fr !important;
        }
    }
}

/* 移动端优化 (481px-767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-brand {
        flex: none;
        padding: 32px 24px;
        min-height: auto;
    }
    
    .brand-name {
        font-size: 26px;
    }
    
    .brand-slogan {
        font-size: 15px;
    }
    
    .brand-features {
        display: none;
    }
    
    .brand-footer {
        display: none;
    }
    
    .auth-form-wrapper {
        padding: 32px 24px;
    }
    
    .auth-form-container {
        max-width: 100%;
    }
    
    .register-form-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    /* 移动端勾选框布局 */
    .terms-group .checkbox-label {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 12px;
    }
    
    .terms-group .checkmark {
        margin-top: 2px;
        flex-shrink: 0;
    }
}

/* 小屏移动端 (最大480px) */
@media (max-width: 480px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-brand {
        flex: none;
        padding: 24px 20px;
        min-height: auto;
    }
    
    .brand-logo {
        width: 60px;
        height: 60px;
    }
    
    .brand-logo svg {
        width: 36px;
        height: 36px;
    }
    
    .brand-name {
        font-size: 24px;
    }
    
    .brand-slogan {
        font-size: 14px;
    }
    
    .brand-features {
        display: none;
    }
    
    .brand-footer {
        display: none;
    }
    
    .auth-form-wrapper {
        padding: 24px 20px;
    }
    
    .auth-form-container {
        max-width: 100%;
    }
    
    .auth-header h2 {
        font-size: 24px;
    }
    
    .register-form-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    /* 防止 iOS 缩放 */
    .input-wrapper input {
        padding: 14px 16px 14px 44px;
        font-size: 16px !important;
    }
    
    /* 小屏移动端勾选框布局 */
    .terms-group .checkbox-label {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    .terms-group .checkmark {
        margin-top: 2px;
        flex-shrink: 0;
    }
    
    .terms-group .checkbox-label span:last-child {
        font-size: 14px;
        line-height: 1.4;
    }
}

/* 超宽屏优化 (1920px+) */
@media (min-width: 1920px) {
    .auth-brand {
        flex: 0 0 55%;
        padding: 100px;
    }
    
    .brand-name {
        font-size: 48px;
    }
    
    .brand-slogan {
        font-size: 22px;
    }
    
    .feature-item {
        font-size: 18px;
    }
    
    .auth-form-container {
        max-width: 500px;
    }
}
