/* Admin Dashboard Styles */
:root {
    --admin-sidebar-width: 260px;
    --admin-sidebar-collapsed: 70px;
    --admin-header-height: 70px;
    --admin-bg: #f8f9fb;
    --sidebar-bg: #2c3e50;
    --sidebar-active: var(--primary-blue);
}

.admin-body {
    background-color: var(--admin-bg);
    font-size: 14px;
    position: relative;
}

.admin-body.sidebar-open {
    overflow: hidden;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Admin Layout */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--admin-sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: white;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
}

.admin-sidebar.active,
.admin-sidebar.mobile-open {
    transform: translateX(0);
}

.admin-sidebar.collapsed {
    width: var(--admin-sidebar-collapsed);
}

.admin-main {
    margin-left: var(--admin-sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.admin-sidebar.collapsed + .admin-main {
    margin-left: var(--admin-sidebar-collapsed);
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-logo span {
    font-weight: 600;
    white-space: nowrap;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background-color: var(--sidebar-active);
    color: white;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: white;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-item span {
    white-space: nowrap;
    transition: var(--transition);
}

.admin-sidebar.collapsed .nav-item span {
    opacity: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .btn {
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

/* Admin Header */
.admin-header {
    height: var(--admin-header-height);
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.header-left h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-search {
    position: relative;
}

.header-search input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    width: 250px;
}

.header-search i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

.header-notifications {
    position: relative;
}

.notification-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--primary-red);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.header-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.header-profile span {
    font-weight: 500;
    color: var(--text-dark);
}

/* Admin Content */
.admin-content {
    padding: 2rem;
}

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.stat-info p {
    margin: 0.25rem 0 0.5rem;
    color: var(--text-gray);
    font-weight: 500;
}

.stat-change {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-weight: 500;
}

.stat-change.positive {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.stat-change.negative {
    background-color: #ffebee;
    color: #c62828;
}

.stat-change.neutral {
    background-color: #f5f5f5;
    color: var(--text-gray);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.125rem;
}

/* Activity List */
.activity-list {
    padding: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 35px;
    height: 35px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.activity-content p {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.activity-content small {
    color: var(--text-gray);
    font-size: 0.75rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    font-weight: 500;
}

.quick-action:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.quick-action i {
    font-size: 1.125rem;
}

/* Posts/Events Lists */
.posts-list,
.events-list,
.messages-list {
    padding: 1rem;
}

.post-item,
.event-item,
.message-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.post-item:last-child,
.event-item:last-child,
.message-item:last-child {
    border-bottom: none;
}

.post-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.post-status.published {
    background-color: #4caf50;
}

.post-status.draft {
    background-color: #ff9800;
}

.post-content,
.event-content,
.message-content {
    flex: 1;
}

.post-content h4,
.event-content h4,
.message-content h4 {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.post-content p,
.event-content p,
.message-content p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.post-actions,
.event-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* Event Date */
.event-date {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-red));
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    min-width: 60px;
}

.event-date .day {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
}

.event-date .month {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Message Item */
.message-item.unread {
    background-color: #f8f9fa;
}

.message-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Analytics Card */
.analytics-card {
    grid-column: span 2;
}

.analytics-chart {
    padding: 1rem;
    height: 300px;
}

.analytics-summary {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: #f8f9fa;
}

.analytics-item {
    text-align: center;
}

.analytics-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
}

.analytics-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-blue);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-card {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .admin-header {
        padding: 0 1rem;
    }
    
    .header-search {
        display: none;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .header-profile span {
        display: none;
    }
}
