* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-header h1 {
    font-size: 32px;
    margin-bottom: 5px;
}

.main-header nav {
    margin-top: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

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

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

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

.btn-admin {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

.btn-admin:hover {
    background: white;
    color: #667eea;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

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

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-top: 10px;
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-form {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

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

.filter-group select,
.filter-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* Files Grid */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.file-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.file-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.file-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    word-break: break-word;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.badge {
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.file-size {
    color: #666;
    font-size: 14px;
}

.file-date {
    color: #888;
    font-size: 13px;
    margin: 10px 0;
}

.btn-download {
    width: 100%;
    margin-top: 15px;
    background: #28a745;
    color: white;
}

.btn-download:hover {
    background: #218838;
}

/* Forms */
.upload-form,
.form-group {
    margin-bottom: 20px;
}

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

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

.form-group select,
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Table */
.file-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.file-table thead {
    background: #667eea;
    color: white;
}

.file-table th,
.file-table td {
    padding: 12px;
    text-align: left;
}

.file-table tbody tr:hover {
    background: #f5f7fa;
}

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

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

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

.alert ul {
    margin-left: 20px;
}

.no-files {
    text-align: center;
    padding: 40px;
    color: #666;
    grid-column: 1 / -1;
}

/* Footer */
.main-footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .file-table {
        font-size: 12px;
    }
}
