/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    width: 100%;
}

/* 头部样式 - 确保完全居中 */
header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    width: 100%;
}

header p {
    font-size: 1rem;
    opacity: 0.9;
    text-align: center;
    max-width: 800px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 17, 203, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* 记录列表样式 */
.records-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.search-box input {
    padding: 10px 15px;
    border: none;
    font-size: 1rem;
    min-width: 250px;
}

.search-box input:focus {
    outline: none;
}

.search-box button {
    background: #f8f9fa;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    color: #6a11cb;
    font-size: 1.1rem;
}

.clear-search {
    color: #e74c3c;
    text-decoration: none;
    font-size: 0.9rem;
}

.clear-search:hover {
    text-decoration: underline;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-bottom: 15px;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.records-table thead {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
}

.records-table th {
    padding: 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.records-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.records-table tbody tr:hover {
    background-color: #f9f9f9;
}

.records-table td {
    padding: 14px;
    font-size: 0.95rem;
}

/* 产品标签样式 */
.product-tag {
    display: inline-block;
    background-color: #e8f4ff;
    color: #2c3e50;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #c1e0ff;
}

/* 无记录样式 */
.no-records {
    text-align: center;
    padding: 50px 20px;
    color: #7f8c8d;
}

.no-records i {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #bdc3c7;
}

.no-records p {
    font-size: 1.1rem;
}

/* 表格页脚 */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.search-info {
    color: #6a11cb;
}

/* 警告框 */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background-color: #ffeaea;
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

/* 下拉框样式 */
select {
    width: 100%;
    padding: 11px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

select:focus {
    outline: none;
    border-color: #6a11cb;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    margin-top: 30px;
    width: 100%;
}

.footer-note {
    margin-top: 10px;
}

.footer-note a {
    color: #3498db;
    text-decoration: none;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* 响应式调整 - 移动端 */
@media (max-width: 768px) {
    header {
        padding: 20px 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
        flex-direction: row;
        justify-content: center;
        text-align: center;
        gap: 10px;
    }
    
    header p {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box input {
        min-width: 200px;
    }
    
    .records-table th:nth-child(5),
    .records-table td:nth-child(5) {
        display: none;
    }
    
    .table-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    /* 移动端确保表单标题居中 */
    .inline-form-section h2 {
        justify-content: center;
    }
}