/**
 * 认证系统样式
 * 登录注册界面和用户状态显示样式
 */

/* 认证模态框样式 */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10008;
}

.auth-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-header h3 {
    margin: 0;
    font-size: 24px;
}

.auth-header .close {
    font-size: 28px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.auth-header .close:hover {
    opacity: 1;
}

.auth-body {
    padding: 30px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    color: #718096;
    font-size: 14px;
}

/* 试用申请样式 */
.trial-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.trial-option {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trial-option:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.trial-option.selected {
    border-color: #667eea;
    background: #e6f3ff;
}

.trial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.trial-header h4 {
    margin: 0;
    color: #2d3748;
}

.trial-badge {
    background: #48bb78;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.trial-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trial-features li {
    padding: 5px 0;
    color: #4a5568;
    font-size: 14px;
}

.trial-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.trial-note {
    text-align: center;
    color: #718096;
    font-size: 14px;
}

/* 用户状态显示样式 */
.login-status, .trial-status, .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

.status-indicator {
    font-size: 16px;
}

.status-text {
    color: #4a5568;
}

.logged-in .status-text {
    color: #28a745;
    font-weight: 600;
}

.trial-active .status-text {
    color: #48bb78;
    font-weight: 600;
}

.user-email {
    color: #2d3748;
    font-weight: 600;
}

.user-company {
    color: #718096;
    font-size: 12px;
}

/* 认证按钮样式 */
.login-btn, .logout-btn, .trial-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.login-btn {
    background: #667eea;
    color: white;
}

.login-btn:hover {
    background: #5a67d8;
}

.logout-btn {
    background: #e53e3e;
    color: white;
}

.logout-btn:hover {
    background: #c53030;
}

.trial-btn {
    background: #48bb78;
    color: white;
}

.trial-btn:hover {
    background: #38a169;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .trial-options {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .trial-actions {
        flex-direction: column;
    }
}

/* 动画效果 */
.auth-modal {
    animation: fadeIn 0.3s ease;
}

.auth-modal-content {
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 通知样式 */
.auth-notification {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 数据共享状态样式增强 */
.data-sharing-status {
    border-left: 4px solid #667eea !important;
}

.sharing-indicators {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sharing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.sharing-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sharing-label {
    font-weight: 600;
    color: #495057;
}

.sharing-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-indicator {
    font-size: 14px;
}

.status-text {
    font-size: 12px;
    color: #6c757d;
}

.sync-indicator {
    font-size: 14px;
}

.sync-text {
    font-size: 12px;
    color: #6c757d;
}
