/* 登录界面样式 */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.login-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 10px;
}

.login-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.login-tab.active {
    background: #fff;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.login-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.login-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-error {
    padding: 12px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 13px;
    text-align: center;
    display: none;
}

.login-error.show {
    display: block;
}

.user-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 10px;
    margin-bottom: 16px;
}

.user-info-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.logout-btn {
    padding: 6px 12px;
    border: none;
    background: #fff;
    border-radius: 6px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:active {
    transform: scale(0.95);
    background: #f3f4f6;
}

.formula-list-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.formula-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.formula-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.formula-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.formula-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.formula-item:active {
    transform: scale(0.98);
}

.formula-item.default {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: #667eea;
}

.formula-item-left {
    flex: 1;
}

.formula-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.formula-item-info {
    font-size: 11px;
    color: #6b7280;
}

.formula-item-actions {
    display: flex;
    gap: 8px;
}

.formula-item-btn {
    padding: 4px 8px;
    border: none;
    background: #fff;
    border-radius: 4px;
    font-size: 11px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.formula-item-btn:active {
    transform: scale(0.95);
}

.formula-item-btn.delete {
    color: #ef4444;
}

.empty-formula {
    text-align: center;
    padding: 40px 24px;
    color: #9ca3af;
    font-size: 14px;
    line-height: 1.6;
}
