/* Revamped Modern Admin Sidebar & Dashboard Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 1.8rem 1.2rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: white;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-grow: 1;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    transform: translateX(4px);
}

.sidebar-menu a.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* Fixed Bottom Sign Out Section in Admin Sidebar */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.sidebar-logout-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

.admin-main {
    flex-grow: 1;
    background: #f8fafc;
    padding: 2.5rem;
    overflow-x: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
}

.table-responsive {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    overflow-x: auto;
    border: 1px solid #e2e8f0;
}

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

.admin-table th, .admin-table td {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
    background: #f8fafc;
    font-weight: 800;
    color: #334155;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-status {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
}

.badge-published {
    background: #dcfce7;
    color: #166534;
}

.badge-hidden {
    background: #fee2e2;
    color: #991b1b;
}

.badge-draft {
    background: #fef3c7;
    color: #92400e;
}

/* ==========================================================================
   ADMIN MOBILE RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 991px) {
    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 1rem 1.2rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }

    .sidebar-title {
        margin-bottom: 0.8rem;
        padding-bottom: 0.6rem;
    }

    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .sidebar-menu a {
        padding: 0.55rem 0.85rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .sidebar-footer {
        margin-top: 0.8rem;
        padding-top: 0.6rem;
    }

    .sidebar-logout-btn {
        padding: 0.55rem 0.85rem;
        font-size: 0.85rem;
    }

    .admin-main {
        padding: 1.2rem 1rem;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.6rem;
    }
}

@media (max-width: 640px) {
    .sidebar-menu {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-header h1 {
        font-size: 1.4rem !important;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.7rem;
        font-size: 0.82rem;
    }
}
