/* 卡片组件 */
.card {
    background-color: white;
    border-radius: 1rem;
    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;
    transition: all 0.3s ease;
}

/* 按钮组件 */
.btn-primary {
    background-color: #3B82F6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1), 0 2px 4px -1px rgba(59, 130, 246, 0.06);
    transition: all 0.3s ease;
    transform: hover scale(1.02) active scale(0.98);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: rgba(59, 130, 246, 0.9);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-success {
    background-color: #10B981;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1), 0 2px 4px -1px rgba(16, 185, 129, 0.06);
    transition: all 0.3s ease;
    transform: hover scale(1.02) active scale(0.98);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-success:hover {
    background-color: rgba(16, 185, 129, 0.9);
}

.btn-success:active {
    transform: scale(0.98);
}

.btn-danger {
    background-color: #EF4444;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.1), 0 2px 4px -1px rgba(239, 68, 68, 0.06);
    transition: all 0.3s ease;
    transform: hover scale(1.02) active scale(0.98);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.9);
}

.btn-danger:active {
    transform: scale(0.98);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-weight: 500;
    background-color: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
}

/* Tab组件 */
.tab-nav {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    flex: 1;
    padding: 1rem 0;
    text-align: center;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #4b5563;
}

.tab-active {
    color: #3B82F6;
    border-bottom: 2px solid #3B82F6;
}

.tab-content {
    transition: all 0.3s ease;
}

/* 表单组件 */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group {
    margin-bottom: 0.5rem;
}

.form-label {
    display: block;
    color: #4b5563;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.form-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
    font-size: 1rem;
    min-height: 6rem;
    resize: none;
}

.form-textarea:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.error-message {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 智能输入组件 */
.smart-input {
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    min-height: 8rem;
    resize: none;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.smart-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

/* 信息卡片 */
.info-card {
    background-color: #eff6ff;
    border-radius: 1rem;
    padding: 1rem;
    color: #1e40af;
    font-size: 0.875rem;
}

/* 单选按钮组件 */
.radio-group {
    display: flex;
    gap: 0.75rem;
}

.radio-label {
    flex: 1;
    cursor: pointer;
}

.radio-input {
    display: none;
}

.radio-option {
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.2s ease;
}

.radio-input:checked + .expense-option {
    border-color: #EF4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.radio-input:checked + .income-option {
    border-color: #10B981;
    background-color: rgba(16, 185, 129, 0.1);
}

/* 模态框组件 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 28rem;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
}

.modal-close:hover {
    color: #4b5563;
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.modal-actions button {
    flex: 1;
}

/* 密码输入组 */
.password-input-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
}

/* 设置按钮 */
.settings-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F3F4F6;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.settings-btn:hover {
    background-color: #e5e7eb;
}

.password-indicator {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: #EF4444;
}

/* 提示消息组件 */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 50;
    transition: all 0.3s ease;
    opacity: 0;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background-color: #10B981;
}

.toast.error {
    background-color: #EF4444;
}

.toast.warning {
    background-color: #f59e0b;
}

.toast.info {
    background-color: #3B82F6;
}

/* 按钮组样式 */
.button-group {
    position: relative;
}