/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f7f9fc;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.header h1 {
    font-size: 28px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 400;
}

/* 表单容器 */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 卡片样式 */
.card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8eaed;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f2f5;
    background: #fafbfc;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.card-desc {
    color: #7f8c8d;
    font-size: 13px;
    margin: 0;
}

.card-content {
    padding: 24px;
}

/* 子部分样式 */
.subsection {
    margin-bottom: 24px;
}

.subsection:last-child {
    margin-bottom: 0;
}

.subsection h4 {
    font-size: 16px;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
}

/* 表单样式 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #5dade2;
    box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.1);
}

.form-group input::placeholder {
    color: #aab2b8;
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #495057;
    cursor: not-allowed;
    border-color: #e9ecef;
}

.form-group input[readonly]::placeholder {
    color: #6c757d;
}

/* 地区和型号容器 */
.region-container,
.models-container {
    margin-bottom: 16px;
}

.region-item,
.model-item {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.region-item:last-child,
.model-item:last-child {
    margin-bottom: 0;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.4;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(149, 165, 166, 0.25);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #5d6d6e);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(149, 165, 166, 0.35);
}

.btn-outline {
    background: transparent;
    color: #3498db;
    border: 1px solid #3498db;
    box-shadow: none;
}

.btn-outline:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.btn-add {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    margin-top: 12px;
    border: none;
    box-shadow: 0 2px 6px rgba(46, 204, 113, 0.25);
}

.btn-add:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.35);
}

.btn-remove {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    padding: 12px 15px;
    font-size: 12px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.25);
}

.btn-remove:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.35);
}

/* 操作按钮区域 */
.actions-card {
    border: none;
    box-shadow: none;
    background: transparent;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Toast 提示框 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2c3e50;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

.toast.warning {
    background: #f39c12;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .region-item,
    .model-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .card-content {
        padding: 16px;
    }
    
    .card-header {
        padding: 16px;
    }
} 