/* Admin Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #333;
    min-height: 100vh;
}

/* Login Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-content {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.login-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.login-header p {
    color: #7f8c8d;
    margin-bottom: 0;
}

#loginForm .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

#loginForm label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

#loginForm input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#loginForm input:focus {
    border-color: #3498db;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.admin-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header .logo i {
    font-size: 2rem;
    color: #e74c3c;
}

.admin-header .logo h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-header nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-header nav a:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Main */
.admin-main {
    padding: 2rem 0;
}

.admin-main section {
    background: rgba(255, 255, 255, 0.95);
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.admin-main h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card i {
    font-size: 2.5rem;
    padding: 1rem;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.stat-card:nth-child(2) i {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
}

.stat-card:nth-child(3) i {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.stat-card:nth-child(4) i {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #7f8c8d;
    font-weight: 500;
}

/* Actions Section */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #3498db;
    color: white;
    font-size: 1rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.action-btn.export-btn {
    background: #2ecc71;
}

.action-btn.export-btn:hover {
    background: #27ae60;
}

.action-btn.danger-btn {
    background: #e74c3c;
}

.action-btn.danger-btn:hover {
    background: #c0392b;
}

/* Files Section */
.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-bar {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

.search-bar input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 2px solid #ecf0f1;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    border-color: #3498db;
}

.filter-options select {
    padding: 0.8rem 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    background: white;
    cursor: pointer;
}

/* Files Table */
.files-table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.files-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
}

.files-table th,
.files-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.files-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

.files-table tbody tr:hover {
    background: #f8f9fa;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.action-icon {
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.action-icon.download {
    background: #3498db;
    color: white;
}

.action-icon.download:hover {
    background: #2980b9;
}

.action-icon.delete {
    background: #e74c3c;
    color: white;
}

.action-icon.delete:hover {
    background: #c0392b;
}

.file-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.file-type-badge.premium {
    background: rgba(241, 196, 15, 0.2);
    color: #f39c12;
}

.file-type-badge.free {
    background: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.no-files {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.no-files i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-files p {
    font-size: 1.2rem;
}

/* Manual Upload Section */
.upload-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
}

.form-group select,
.form-group input {
    padding: 0.8rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group input:focus {
    border-color: #3498db;
}

.upload-btn {
    padding: 0.8rem 2rem;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
}

.upload-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

/* Pricing Management Section */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.price-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #f1c40f;
}

.price-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-input-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.price-input-group input {
    padding: 0.8rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.price-input-group input:focus {
    border-color: #f1c40f;
}

.price-input-group button {
    padding: 0.8rem;
    background: #f1c40f;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.price-input-group button:hover {
    background: #f39c12;
    transform: translateY(-1px);
}

.pricing-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    color: #7f8c8d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cancel,
.btn-confirm {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-cancel {
    background: #95a5a6;
    color: white;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

.btn-confirm {
    background: #e74c3c;
    color: white;
}

.btn-confirm:hover {
    background: #c0392b;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading-spinner p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Notifications (reutilizando do styles.css) */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    color: #333;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3000;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid #28a745;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

.notification i {
    font-size: 1.2rem;
}

.notification.success i {
    color: #28a745;
}

.notification.error i {
    color: #dc3545;
}

.notification button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    margin-left: auto;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .files-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upload-form {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 25% auto;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .admin-main section {
        padding: 1.5rem;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .files-table th,
    .files-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card i {
        font-size: 2rem;
        padding: 0.75rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
}