/* Admin Panel Styles */

:root {
    --admin-primary: #2e7d32;
    --admin-secondary: #ff8f00;
    --admin-light: #e8f5e9;
    --admin-dark: #1b5e20;
    --admin-accent: #ffcc80;
    --admin-danger: #f44336;
    --admin-success: #4caf50;
    --admin-warning: #ff9800;
    --admin-info: #2196f3;
}

/* Admin Badge */
.admin-badge {
    background-color: var(--admin-secondary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Admin Login Section */
.admin-login-section {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.auth-container h2 {
    color: var(--admin-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    border-color: var(--admin-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.form-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    display: none;
}

.form-message.error {
    background-color: #ffebee;
    color: var(--admin-danger);
    border: 1px solid #ffcdd2;
    display: block;
}

.form-message.success {
    background-color: #e8f5e9;
    color: var(--admin-success);
    border: 1px solid #c8e6c9;
    display: block;
}

/* Admin Dashboard Section */
.admin-dashboard-section {
    padding: 2rem 0;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.stat-card h3 {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--admin-primary);
    margin-bottom: 1rem;
}

.admin-recent-activity {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-recent-activity h3 {
    color: #555;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: flex-start;
}

.activity-time {
    flex: 0 0 150px;
    color: #777;
    font-size: 0.9rem;
}

.activity-description {
    flex: 1;
    color: #333;
}

/* Admin User Management */
.user-management {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.user-table th,
.user-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.user-table th {
    background-color: var(--admin-light);
    color: var(--admin-dark);
    font-weight: 600;
}

.user-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.user-status.pending {
    background-color: #fff3e0;
    color: #e65100;
}

.user-status.approved {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.user-status.rejected {
    background-color: #ffebee;
    color: #c62828;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.user-actions button {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
}

.user-actions .approve {
    background-color: var(--admin-success);
    color: white;
}

.user-actions .reject {
    background-color: var(--admin-danger);
    color: white;
}

/* Admin Content Management */
.content-management {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.content-categories {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.content-category {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background-color: var(--admin-light);
    color: var(--admin-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.content-category:hover,
.content-category.active {
    background-color: var(--admin-primary);
    color: white;
}

.content-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.content-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.content-item h4 {
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.content-item p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.content-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.content-actions button {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
}

.content-actions .edit {
    background-color: var(--admin-info);
    color: white;
}

.content-actions .delete {
    background-color: var(--admin-danger);
    color: white;
}

/* Admin Settings */
.admin-settings {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    color: #555;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.logo-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
}

.logo-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-upload input[type="file"] {
    display: none;
}

.logo-upload label {
    padding: 0.5rem 1rem;
    background-color: var(--admin-primary);
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

/* Content Editor Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.modal {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    color: var(--admin-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Responsive Admin Styles */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .activity-item {
        flex-direction: column;
    }
    
    .activity-time {
        margin-bottom: 0.25rem;
    }
    
    .user-table {
        display: block;
        overflow-x: auto;
    }
    
    .content-items {
        grid-template-columns: 1fr;
    }
}
