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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 登录页面 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.login-form {
    padding: 40px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #007bff;
}

.required {
    color: #dc3545;
}

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

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* 后台布局 */
.admin-header {
    background: #2c3e50;
    color: white;
    padding: 15px 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
}

.admin-nav a:hover {
    text-decoration: underline;
}

.admin-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 250px;
    background: #34495e;
    color: white;
}

.sidebar ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar li {
    border-bottom: 1px solid #2c3e50;
}

.sidebar a {
    display: block;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar a:hover,
.sidebar li.active a {
    background: #2c3e50;
    color: white;
}

.main-content {
    flex: 1;
    padding: 20px;
    background: #ecf0f1;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 36px;
    color: #007bff;
    margin-bottom: 10px;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* 扫码页面 */
.qr-page {
    background: #f8f9fa;
    min-height: 100vh;
}

.qr-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.qr-header {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qr-description {
    color: #666;
    margin-top: 10px;
}

.qr-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 单选/多选样式 */
.radio-label,
.checkbox-label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.radio-label input,
.checkbox-label input {
    margin-right: 8px;
}

/* 警告框 */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
}

/* 排序输入框 */
.order-input {
    width: 60px;
    text-align: center;
}

/* 筛选表单 */
.filter-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.filter-form .form-group {
    margin-bottom: 0;
}

/* 快捷操作 */
.quick-actions {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

/* 提交详情 */
.submission-details {
    line-height: 1.8;
}

.detail-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
    border-bottom: none;
}

/* 日期时间选择器样式 */
.datetime-picker {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.datetime-picker select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: white url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 8px center;
    background-size: 12px;
    padding-right: 25px;
}

.datetime-picker select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .datetime-picker {
        flex-direction: column;
        align-items: stretch;
    }
    
    .datetime-picker select {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* 多图上传样式 */
.multi-image-upload {
    position: relative;
}

.image-preview-container {
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
    background: #f8f9fa;
}

.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
}

.remove-image:hover {
    background: #c82333;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .image-previews {
        justify-content: center;
    }
    
    .image-preview-item {
        width: 70px;
        height: 70px;
    }
}

/* 文件输入样式优化 */
.multi-image-input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    width: 100%;
}

.multi-image-input:hover {
    border-color: #007bff;
}

/* 多图显示样式 */
.multiple-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.multiple-images img {
    transition: transform 0.2s ease;
}

.multiple-images img:hover {
    transform: scale(1.05);
}

/* 移动端多图优化 */
@media (max-width: 768px) {
    .multiple-images {
        justify-content: center;
    }
    
    .multiple-images img {
        max-width: 120px !important;
        max-height: 120px !important;
    }
}