/* 简洁表单样式 */
.form-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.form-header {
    background: #f8f9fa;
    color: #333;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.form-header h3 {
    margin: 0;
    font-weight: 500;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.form-header h3 i {
    margin-right: 8px;
    font-size: 16px;
}

.form-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
    position: relative;
}

.form-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    display: block;
    font-size: 14px;
}

.form-control {
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out;
    background-color: #fff;
    width: 100%;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    background-color: #fff;
    outline: none;
}

.form-control:hover {
    border-color: #999;
}

/* 输入框图标 */
.input-group {
    position: relative;
    display: flex;
}

.input-group-addon {
    background: #f8f9fa;
    border: 1px solid #ccc;
    color: #666;
    border-radius: 3px 0 0 3px;
    padding: 8px 12px;
    font-size: 14px;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 3px 3px 0;
}

.input-group .form-control:focus {
    border-left: none;
}

/* 下拉框样式 */
select.form-control {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* 日期输入框样式 */
.date-input {
    position: relative;
}

.date-input .form-control {
    padding-right: 45px;
    cursor: pointer;
}

.date-input::after {
    content: '\f073';
    font-family: 'FontAwesome';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 16px;
    pointer-events: none;
}

/* 按钮样式 */
.btn {
    border-radius: 3px;
    padding: 8px 16px;
    font-weight: 400;
    font-size: 14px;
    transition: background-color 0.15s ease-in-out;
    border: 1px solid transparent;
    text-transform: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1c7430;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-default {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-default:hover {
    background-color: #545b62;
    border-color: #4e555b;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* 按钮组样式 */
.btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* 验证错误样式 */
.text-danger {
    color: #e74c3c !important;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.field-validation-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-body {
        padding: 20px 15px;
    }
    
    .form-header {
        padding: 20px 15px;
    }
    
    .form-header h3 {
        font-size: 20px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 加载动画 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 成功提示样式 */
.alert-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}
