:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --warning: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

html {
    font-size: 16px;
}

input, select, textarea {
    min-width: 1px;
    max-width: 100%;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fb;
    color: var(--dark);
    line-height: 1.6;
}

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

header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 10px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 0 0 15px 15px;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header {
    background: var(--light);
    padding: 15px 20px;
    border-bottom: 1px solid var(--light-gray);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 25px;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* 移动端优先适配 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 1rem 1.2rem;
        font-size: 1.1rem;
    }
    
    .date-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .card-body {
        padding: 15px;
    }
    
    .preview-container {
    grid-template-columns: 1fr;
    gap: 8px;
}

.upload-item {
    position: relative;
    padding-bottom: 2px;
}

.upload-item img {
    max-height: 80vh;
    object-fit: contain;
}
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 10px 0;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

th {
    background-color: var(--light);
    font-weight: 600;
}

tr:hover {
    background-color: rgba(67, 97, 238, 0.03);
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.3);
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
    min-width: auto;
}

.btn-success {
    background: var(--success);
}

.btn-danger {
    background: var(--warning);
}

.btn-danger:hover {
    background: #d63384;
    box-shadow: 0 4px 8px rgba(247, 37, 133, 0.3);
}

/* 进度条样式 */
.progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    height: 20px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.progress-bar-container span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-weight: bold;
    font-size: 0.85rem;
    text-shadow: 0px 0px 3px rgba(255, 255, 255, 0.7);
}

.btn-success:hover {
    background: #2bb8e0;
}

.btn-warning {
    background: var(--warning);
}

.btn-warning:hover {
    background: #e01a6d;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.action-buttons .btn {
    white-space: nowrap;
    min-width: auto;
    flex-shrink: 0;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.logout-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.logout-link:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 25px 0;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 40px;
}

/* 模态框样式 */
.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.show {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--gray);
    cursor: pointer;
}

.close:hover {
    color: var(--dark);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray);
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(76, 201, 240, 0.15);
    color: #0a9396;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: rgba(247, 37, 133, 0.15);
    color: #ae0c3e;
    border-left: 4px solid var(--warning);
}

.alert i {
    font-size: 1.4rem;
}

.nav-menu {
    display: flex;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.nav-link {
    padding: 15px 20px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary) !important;
    color: white !important;
}

.upload-area {
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(67, 97, 238, 0.03);
    margin-top: 10px;
}

.upload-area:hover {
    background: rgba(67, 97, 238, 0.08);
}

.upload-area i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.upload-area h3 {
    color: var(--dark);
    margin-bottom: 10px;
}

.upload-area p {
    color: var(--gray);
    font-size: 0.95rem;
}

.upload-area.active {
    border-color: var(--success);
    background: rgba(76, 201, 240, 0.1);
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1/1;
}

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

.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(247, 37, 133, 0.8);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.progress-bar {
    height: 6px;
    background: var(--light-gray);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 15px;
}

.progress {
    height: 100%;
    background: var(--success);
    width: 0%;
    transition: width 0.3s;
}

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

.login-header {
    background: linear-gradient(135deg);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.login-header i {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.login-content {
    padding: 40px 30px;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 25px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.back-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}