/* 通用表单页面样式 v1.0 */
/* 适用于所有编辑/创建表单页面 */

/* 表单容器 */
.common-form {
    margin-bottom: 40px;
}

/* 页面标题样式 */
.page-header {
    background: linear-gradient(135deg, #4285F4, #6A5ACD);
    color: white;
    padding: 25px 30px;
    border-radius: 10px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.page-header h2 {
    margin: 0;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.page-header p {
    margin: 5px 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 60%);
    transform: rotate(-30deg);
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    overflow: hidden;
    border: none;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa, #edf2f7);
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.card-body {
    padding: 25px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 10px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #4285F4;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
}

.text-danger {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

.form-check {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    font-weight: normal;
    user-select: none;
}

/* 按钮样式 */
.btn-section {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

.btn {
    padding: 12px 25px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: none;
    font-size: 15px;
}

.btn-primary {
    background: linear-gradient(135deg, #4285F4, #6A5ACD);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(66,133,244,0.3);
    background: linear-gradient(135deg, #3367d6, #5849b6);
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #555;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    background-color: #eff3f6;
}

.btn-outline-secondary {
    background-color: #fff;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #5a6268;
    border-color: #5a6268;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, #218838, #1b9e77);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, #c82333, #bd2130);
}

/* 文本区域样式 */
textarea.form-control {
    min-height: 120px;
}

/* 表单分组 */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.form-col {
    padding-right: 15px;
    padding-left: 15px;
    flex: 0 0 50%;
    max-width: 50%;
}

/* 输入组样式 */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* 徽章样式 */
.info-badge {
    display: inline-block;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #4285F4, #6A5ACD);
    border-radius: 30px;
    box-shadow: 0 3px 10px rgba(66, 133, 244, 0.2);
    margin-bottom: 10px;
}

/* 帮助文本 */
.form-text {
    color: #6c757d;
    font-size: 13px;
    margin-top: 5px;
}

/* 警告和提示框 */
.alert {
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.alert-info {
    background-color: #e8f4fd;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .btn-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-section .btn {
        width: 100%;
    }
} 