/* Admin Styles */

/* Admin Login Page */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    position: relative;
}

.admin-login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.admin-login-header i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.admin-login-header h1 {
    font-size: 28px;
    margin: 10px 0;
    color: #1f2937;
}

.admin-login-header p {
    color: #6b7280;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.form-group label i {
    color: #667eea;
    margin-right: 5px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #667eea;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
}

.error-message i {
    margin-right: 8px;
}

.btn-admin-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-admin-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-admin-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-admin-login i {
    margin-right: 8px;
}

.admin-login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e5e7eb;
}

.admin-login-footer p {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 10px;
}

.admin-login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.admin-login-footer a:hover {
    text-decoration: underline;
}

.security-badge {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 30px;
    color: white;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Admin Dashboard */
.admin-body {
    background: #f3f4f6;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-nav {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
}

.admin-nav-brand small {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.7;
}

.admin-nav-menu {
    display: flex;
    gap: 10px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: white;
    color: #1f2937;
}

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

.btn-logout {
    background: rgba(239, 68, 68, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: #ef4444;
}

/* Admin Container */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h1 {
    font-size: 28px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-refresh {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-weight: 500;
}

.btn-refresh:hover {
    border-color: #667eea;
    color: #667eea;
}

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

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
}

.stat-info h3 {
    font-size: 32px;
    margin: 0 0 5px 0;
    color: #1f2937;
}

.stat-info p {
    margin: 0 0 8px 0;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.stat-change {
    font-size: 12px;
    color: #10b981;
    font-weight: 500;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

/* Recent Activity */
.recent-activity-card,
.recent-users-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.recent-activity-card h3,
.recent-users-card h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-list,
.users-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 15px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.activity-details h4 {
    margin: 0 0 5px 0;
    color: #1f2937;
    font-size: 14px;
}

.activity-details p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

/* User Item */
.user-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-item:last-child {
    border-bottom: none;
}

.user-info h4 {
    margin: 0 0 5px 0;
    color: #1f2937;
    font-size: 14px;
}

.user-info p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-admin {
    background: #dbeafe;
    color: #1e40af;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 20px;
}

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

.admin-table thead {
    background: #f9fafb;
}

.admin-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 15px;
    border-top: 1px solid #e5e7eb;
    color: #1f2937;
}

.admin-table tbody tr:hover {
    background: #f9fafb;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-banned {
    background: #fee2e2;
    color: #991b1b;
}

.role-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.role-user {
    background: #e0e7ff;
    color: #3730a3;
}

.role-admin {
    background: #fef3c7;
    color: #92400e;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.btn-view {
    background: #dbeafe;
    color: #1e40af;
}

.btn-ban {
    background: #fee2e2;
    color: #991b1b;
}

.btn-unban {
    background: #d1fae5;
    color: #065f46;
}

.btn-delete {
    background: #fecaca;
    color: #7f1d1d;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Search & Filter */
.search-input,
.filter-select,
.date-input {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus,
.filter-select:focus,
.date-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-input {
    min-width: 300px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 15px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

.stats-detail-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stats-detail-card h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.stats-table-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stats-table-card h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-small {
    max-width: 400px;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #1f2937;
}

.user-details-content {
    margin-top: 20px;
}

.user-detail-grid {
    display: grid;
    gap: 20px;
}

.detail-section {
    background: #f9fafb;
    padding: 20px;
    border-radius: 10px;
}

.detail-section h3 {
    margin: 0 0 15px 0;
    color: #1f2937;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.detail-section p {
    margin: 10px 0;
    color: #374151;
    line-height: 1.6;
}

.detail-section strong {
    color: #1f2937;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cancel,
.btn-confirm {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #e5e7eb;
    color: #374151;
}

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

.btn-cancel:hover,
.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Loading State */
.loading {
    text-align: center;
    color: #6b7280;
    padding: 20px;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .stats-grid,
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .search-input {
        min-width: auto;
        width: 100%;
    }
}
