/* 管理后台样式 */
:root {
    --primary-color: #DC2626;
    --text-color: #1F2937;
    --border-color: #E5E7EB;
    --bg-color: #F3F4F6;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* 表格样式优化 */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: #F9FAFB;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: #F9FAFB;
}

/* 状态样式优化 */
.status-select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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 8px center;
    background-size: 16px;
    min-width: 120px;
}

.status-pending {
    color: #C2410C;
    background-color: #FEF3C7;
    border-color: #F59E0B;
}

.status-processing {
    color: #1D4ED8;
    background-color: #EFF6FF;
    border-color: #3B82F6;
}

.status-completed {
    color: #047857;
    background-color: #ECFDF5;
    border-color: #10B981;
}

.status-rejected {
    color: #991B1B;
    background-color: #FEF2F2;
    border-color: #EF4444;
}

.status-select:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 操作按钮优化 */
.view-btn,
.delete-btn {
    padding: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 0.25rem;
    background: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.view-btn {
    color: #4F46E5;
    background-color: #EEF2FF;
}

.delete-btn {
    color: #DC2626;
    background-color: #FEF2F2;
}

.view-btn:hover {
    background: #E0E7FF;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.delete-btn:hover {
    background: #FEE2E2;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

td:last-child {
    white-space: nowrap;
    text-align: center;
    min-width: 100px;
}

/* 表格单元格对齐优化 */
.admin-table td {
    vertical-align: middle;
}

.admin-table th {
    white-space: nowrap;
    background: #F8FAFC;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 确保表格内容垂直居中 */
.admin-table td > * {
    vertical-align: middle;
}

.status-form {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
}

.delete-form {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
}

/* 导出按钮优化 */
.export-section {
    margin-top: 1rem;
    text-align: right;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #059669;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.export-btn:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(5, 150, 105, 0.3);
}

.export-btn i {
    font-size: 1.1rem;
}

/* 筛选区域优化 */
.filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 600;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
}

.form-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4B5563;
}

.search-group {
    flex: 2;
}

.date-group {
    flex: 2;
}

.date-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.date-separator {
    color: #6B7280;
    padding: 0 0.5rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    min-width: auto;
    align-items: flex-end;
}

.filter-form input,
.filter-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: white;
}

.filter-form input:focus,
.filter-form select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.filter-form input::placeholder {
    color: #9CA3AF;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #B91C1C;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
}

.reset-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.reset-btn:hover {
    background: #F3F4F6;
    transform: translateY(-2px);
    border-color: #D1D5DB;
}

/* 分页优化 */
.pagination-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-info {
    color: #6B7280;
    font-size: 0.9rem;
    white-space: nowrap;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    background: white;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination a:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.page-btn {
    font-size: 0.9rem;
}

.page-ellipsis {
    border: none !important;
    background: none !important;
    color: #6B7280;
    min-width: 24px !important;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.jump-input {
    width: 60px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
}

.jump-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.jump-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.jump-btn:hover {
    background: #B91C1C;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form .form-group {
        width: 100%;
    }
    
    .admin-table {
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5vh auto;
        padding: 1rem;
    }

    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .pagination {
        justify-content: center;
    }

    .pagination-jump {
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .filter-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-group {
        width: 100%;
    }

    .search-group,
    .date-group {
        flex: 1;
    }

    .button-group {
        flex-direction: row;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .filter-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .export-section {
        text-align: center;
    }

    .button-group {
        flex-direction: column;
    }

    .filter-btn,
    .reset-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 0.5rem;
        font-size: 0.85rem;
    }

    .jump-input {
        width: 50px;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: white;
    margin: 10vh auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover {
    color: var(--danger-color);
    background: #FEE2E2;
    transform: rotate(90deg);
}

.detail-item {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.detail-item label {
    font-weight: 600;
    color: #374151;
    min-width: 100px;
    margin-right: 1rem;
}

.detail-item span {
    color: #4B5563;
    flex: 1;
}

.message-content {
    margin-top: 0.5rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 8px;
    white-space: pre-wrap;
    color: #4B5563;
    line-height: 1.6;
    border: 1px solid #E5E7EB;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 隐藏表单详情标题 */
.table-details {
    display: none !important;
}

/* 导入按钮样式 */
.import-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #4F46E5;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
    margin-right: 1rem;
    cursor: pointer;
}

.import-btn:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}

/* 每页显示条数选择器样式 */
.per-page-select {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.per-page-select select {
    padding: 0.25rem 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.per-page-select select:hover {
    border-color: var(--primary-color);
}

.per-page-select select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* 导入表单样式 */
.import-form {
    margin-top: 1.5rem;
}

.import-form .form-group {
    margin-bottom: 1.5rem;
}

.import-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.import-form input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: #F9FAFB;
    cursor: pointer;
    transition: all 0.3s ease;
}

.import-form input[type="file"]:hover {
    border-color: var(--primary-color);
    background: #F3F4F6;
}

.form-tip {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #6B7280;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.import-submit-btn {
    padding: 0.75rem 1.5rem;
    background: #4F46E5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.import-submit-btn:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}

.cancel-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #F3F4F6;
    transform: translateY(-2px);
    border-color: #D1D5DB;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .per-page-select {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 0.5rem;
    }
    
    .import-btn {
        margin-right: 0;
        margin-bottom: 0.5rem;
        width: 100%;
        justify-content: center;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .import-submit-btn,
    .cancel-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 提示消息样式 */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background-color: #ECFDF5;
    border: 2px solid #10B981;
    color: #047857;
}

.alert-error {
    background-color: #FEF2F2;
    border: 2px solid #EF4444;
    color: #991B1B;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 导出下拉菜单样式 */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 100;
    min-width: 160px;
    animation: fadeIn 0.2s ease;
}

.export-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 0.25rem;
}

.export-menu a:hover {
    background: #F3F4F6;
    color: var(--primary-color);
}

.export-menu a i {
    width: 1.25rem;
    text-align: center;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #059669;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
    cursor: pointer;
}

.export-btn:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(5, 150, 105, 0.3);
}

.export-btn i:last-child {
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

@media (max-width: 768px) {
    .export-dropdown {
        display: block;
        margin-top: 0.5rem;
    }
    
    .export-btn {
        width: 100%;
        justify-content: center;
    }
    
    .export-menu {
        width: 100%;
    }
}

/* 文件上传样式优化 */
.file-upload-wrapper {
    margin-bottom: 1rem;
}

.selected-files {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.selected-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

.selected-file-item:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.selected-file-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.selected-file-item .fa-file-csv {
    color: #059669;
}

.selected-file-item .fa-file-excel {
    color: #047857;
}

.file-name {
    flex: 1;
    font-size: 0.95rem;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.9rem;
    color: #6B7280;
    min-width: 70px;
    text-align: right;
}

.file-size.invalid-size {
    color: #DC2626;
}

.size-warning {
    font-size: 0.85rem;
    color: #DC2626;
    background: #FEF2F2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.total-size-warning {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #FEF2F2;
    border: 2px solid #EF4444;
    color: #991B1B;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.import-submit-btn:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.import-submit-btn:disabled:hover {
    background: #9CA3AF;
    transform: none;
    box-shadow: none;
}

/* 自定义文件输入框样式 */
.file-upload-wrapper input[type="file"] {
    width: 100%;
    padding: 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: #F9FAFB;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-wrapper input[type="file"]:hover {
    border-color: var(--primary-color);
    background: #F3F4F6;
}

.file-upload-wrapper input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.file-upload-wrapper input[type="file"]::file-selector-button:hover {
    background: #B91C1C;
}

@media (max-width: 768px) {
    .selected-file-item {
        flex-wrap: wrap;
    }
    
    .file-name {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .size-warning {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
}

.template-btn {
    background-color: #4CAF50;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
}

.template-btn i {
    margin-right: 5px;
}

.template-btn:hover {
    background-color: #45a049;
}

.template-download {
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.template-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.template-link:hover {
    text-decoration: underline;
}

.template-link i {
    margin-right: 5px;
}

.error-details {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
}

.error-details h4 {
    color: #d32f2f;
    margin: 0 0 10px 0;
}

.error-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.error-item {
    padding: 5px 0;
    border-bottom: 1px solid #ffe0e0;
}

.error-item:last-child {
    border-bottom: none;
}

.error-row {
    color: #d32f2f;
    font-weight: 500;
}

.error-reason {
    color: #666;
    margin-left: 5px;
} 