* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px 0;
    border-bottom: 3px solid #e0e0e0;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    padding: 25px;
    margin: -20px -20px 30px -20px;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.logo-icon {
    font-size: 28px;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

header h1 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

header h1 i {
    color: #667eea;
    font-size: 24px;
}

.header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-radius: 25px;
    border: 2px solid #4CAF50;
    margin-left: 15px;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.member-info i {
    color: #2e7d32;
    font-size: 18px;
}

.member-info span {
    font-size: 14px;
    color: #2e7d32;
    font-weight: 500;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.search-section {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.search-input-container {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
    z-index: 1;
}

.search-section input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.search-section input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.filter-section {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-btn:hover {
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.filter-btn i {
    font-size: 14px;
}

.table-container {
    overflow-x: auto;
    overflow-y: auto;
    margin-bottom: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    background: white;
    max-height: 70vh;
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    min-width: 1800px;
    table-layout: auto;
}

th, td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* 序号列样式 */
.serial-number-column {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    text-align: center;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    position: sticky;
    left: 0;
    z-index: 15;
    border-right: 2px solid #dee2e6;
}

/* 操作列样式 */
.action-column {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
    position: sticky;
    right: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    z-index: 15;
    border-left: 2px solid #dee2e6;
}

/* 序号单元格样式 */
.serial-number {
    font-weight: bold;
    color: #495057;
    text-align: center;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    position: sticky;
    left: 0;
    z-index: 10;
    border-right: 2px solid #dee2e6;
}

/* 操作按钮单元格样式 */
.action-buttons-cell {
    position: sticky;
    right: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    z-index: 10;
    border-left: 2px solid #dee2e6;
    text-align: center;
}

th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: bold;
    color: #2c3e50;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 20;
    transition: all 0.3s ease;
}

th:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #3498db;
}

th i {
    margin-right: 5px;
    color: #667eea;
}

.sort-icon {
    margin-left: 8px;
    font-size: 12px;
    color: #999;
}

.sort-icon.asc::after {
    content: '↑';
    color: #3498db;
    font-weight: bold;
}

.sort-icon.desc::after {
    content: '↓';
    color: #3498db;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: scale(1.005);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 确保悬停时固定列的背景色保持一致 */
tr:hover .serial-number,
tr:hover .action-buttons-cell {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    min-width: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.status.valid {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.expiring {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status.expired {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.action-buttons .btn {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 12px;
    min-width: auto;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    flex-wrap: wrap;
    gap: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.pagination-info {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
}

.pagination-buttons button {
    padding: 10px 15px;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pagination-buttons button:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.pagination-buttons button.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.pagination-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 3% auto;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: #667eea;
    font-size: 22px;
}

.close {
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #667eea;
    font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-100px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.message {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 18px 25px;
    border-radius: 15px;
    color: white;
    font-weight: bold;
    z-index: 1001;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.message.success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.message.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.message.warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.message.info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 15px;
    }
    
    table {
        min-width: 1600px;
    }
    
    th, td {
        padding: 10px 6px;
        font-size: 12px;
        max-width: 120px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        margin: 5px;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
        padding: 20px;
    }
    
    .title-section {
        justify-content: center;
    }
    
    .header-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .member-info {
        margin-left: 0;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .search-section {
        flex-direction: column;
        padding: 15px;
    }
    
    .filter-section {
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .pagination {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
    
    .table-container {
        font-size: 11px;
        max-height: 60vh;
    }
    
    table {
        min-width: 1400px;
    }
    
    th, td {
        padding: 8px 4px;
        font-size: 11px;
        max-width: 100px;
    }
    
    .serial-number-column {
        width: 50px;
        min-width: 50px;
        max-width: 50px;
    }
    
    .action-column {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .action-buttons .btn {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .logo-container {
        width: 50px;
        height: 50px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
    
    header h1 {
        font-size: 24px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 表格内容截断提示 */
th[title], td[title] {
    cursor: help;
}

/* 固定列阴影效果 */
.serial-number-column::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1));
    pointer-events: none;
}

.action-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to left, transparent, rgba(0,0,0,0.1));
    pointer-events: none;
}