/* Modern Design System - NGO Media System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

:root {
    --primary: #2f855a;
    /* Green 600 */
    --primary-dark: #276749;
    /* Green 800 */
    --secondary: #ffffff;
    /* White for highlights */
    --accent: #38b2ac;
    /* Teal accent */
    --bg-body: #ffffff;
    /* White background */
    --bg-card: #ffffff;
    /* White cards */
    --text-main: #1a202c;
    /* Dark text */
    --text-muted: #4a5568;
    /* Muted text */
    --border: #e2e8f0;
    /* Light border */
    --sidebar-bg: var(--primary);
    --sidebar-active: #1f2937;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 0.75em;
    line-height: 1.2;
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* --- Layout --- */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: white;
    height: 100vh;
    padding: 2rem;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Playfair Display', serif;
}

.sidebar a {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    /* White text */
    padding: 1rem 1.2rem;
    /* Increased padding */
    margin-bottom: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1.1rem;
    /* Increased font */
    transition: all var(--transition);
}

.sidebar a:hover,
.sidebar a.active {
    background-color: rgba(255, 255, 255, 0.2);
    /* Semi-transparent white */
    color: white;
    transform: translateX(4px);
    font-weight: 600;
}

.content {
    margin-left: 280px;
    padding: 2.5rem;
    max-width: 1400px;
}

/* --- Public Pages Layout (No Sidebar) --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    background: white;
    padding: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 2rem;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-links a {
    margin-left: 2rem;
    color: var(--text-main);
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--primary);
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
    border-radius: var(--radius);
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.hero h1 {
    color: white;
    margin-bottom: 0.75rem;
    font-size: 2.25rem;
    font-family: 'Playfair Display', serif;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Components --- */
.card,
.stat-card,
.project-card,
.media-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stat-card {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.card:hover,
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.btn,
button,
input[type="submit"],
.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(15, 118, 110, 0.2);
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(241, 255, 255, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.btn-delete {
    background-color: transparent !important;
    color: var(--danger) !important;
    border: 1px solid var(--danger) !important;
    padding: 0.4rem 0.8rem !important;
    font-size: 0.875rem !important;
    border-radius: 6px !important;
}

.btn-delete:hover {
    background-color: #fef2f2 !important;
    box-shadow: none !important;
}

/* --- Forms --- */
.form-container {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto 2rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: #f9fafb;
    transition: all var(--transition);
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th,
td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f9fafb;
}

/* --- Grid/* Admin Media Grid */
.admin-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* --- Grid Systems --- */
.grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    /* Auto-fill keeps them distinct */
    gap: 1.5rem;
    /* Consistent spacing */
    margin-top: 2rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    /* Force strict thumbnail size */
    gap: 1rem;
    margin-top: 2rem;
}

/* --- Status Badges --- */
.status {
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: none;
    transition: background 0.2s;
}

.btn-approve {
    background: #10b981;
    color: white;
}

.btn-approve:hover {
    background: #059669;
}

.btn-reject {
    background: #f59e0b;
    color: white;
}

.btn-reject:hover {
    background: #d97706;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-download {
    background: #3b82f6;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: auto;
    /* Push other buttons to the right if using flex */
}

.btn-download:hover {
    background: #2563eb;
}

/* --- Media Gallery --- */
.media-preview {
    height: 120px;
    /* Smaller height for gallery */
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
    background: #e5e7eb;
}

.media-preview img,
.media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.media-card {
    padding: 0.75rem;
    /* Compact card */
    font-size: 0.85rem;
}

.media-card:hover .media-preview img {
    transform: scale(1.05);
}

/* --- Lightbox --- */
#lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    padding: 2rem;
    backdrop-filter: blur(5px);
}

#lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

#lightbox img,
#lightbox video {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: 0.2s;
}

#lightbox-close:hover {
    transform: scale(1.1);
    color: var(--secondary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- Login Page Specific --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f766e 0%, #064e3b 100%);
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.login-card h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 2rem;
    font-family: 'Playfair Display', serif;
}


/* --- Video Preview --- */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}


.video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.media-card:hover .play-icon-overlay {
    background: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon {
    color: white;
    font-size: 24px;
    margin-left: 4px;
    /* Optical center adjustment for triangle */
}

/* --- Utilities --- */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--primary);
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.w-100 {
    width: 100%;
}

.fs-sm {
    font-size: 0.875rem;
}

.fs-lg {
    font-size: 1.125rem;
}

.fs-xl {
    font-size: 1.25rem;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 2rem;
}

.error-message {
    color: var(--danger);
    background: #fef2f2;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* --- Gallery Specific --- */
.gallery-header-link {
    color: inherit;
    font-weight: 500;
}

.gallery-location-badge {
    pointer-events: none;
    border-radius: 50px;
    background-color: #f3f4f6;
    border-color: #e5e7eb;
}

.gallery-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-title {
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.gallery-description {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- Project Tile Improvements --- */
.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    font-size: 0.85rem;
    /* Smaller text */
    border-radius: 8px;
    /* Softer corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 120px;
    /* Very compact thumbnail */
    background: #e5e7eb;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-img-top img {
    transform: scale(1.05);
    /* Subtle zoom */
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    background: #f3f4f6;
}

.project-card .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0.85rem;
    /* Tighter padding */
}

.project-card h3 {
    font-size: 1rem;
    /* Smaller title */
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

/* --- Premium Gallery Masonry Layout --- */
.gallery-masonry {
    column-count: 1;
    column-gap: 1.5rem;
}

@media (min-width: 640px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .gallery-masonry {
        column-count: 3;
    }
}

.media-card.gallery-mode {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.media-card.gallery-mode:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.media-preview-gallery {
    height: auto;
    /* Let content define height for true masonry */
    width: 100%;
    display: block;
}

.media-preview-gallery img,
.media-preview-gallery video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- Gallery Overlay & Hover Effects --- */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.media-card.gallery-mode:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-text {
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.media-card.gallery-mode:hover .gallery-overlay-text {
    transform: translateY(0);
}

.gallery-overlay-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-overlay-meta {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* --- Play Icon Style Update --- */
.play-icon-overlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.media-card.gallery-mode:hover .play-icon-overlay {
    background: rgba(0, 0, 0, 0.2);
    /* Lighten on hover */
    transform: translate(-50%, -50%) scale(1.1);
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    border: none;
    background: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.filter-btn:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

/* Hide items when filtered out */
.media-card.hidden {
    display: none;
}

/* --- Lightbox Styles --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-wrapper {
    position: relative;
    width: 80%;
    /* Width of the whole modal */
    max-width: 1100px;
    height: 70vh;
    /* Fixed height for split layout */
}

.lightbox-content-split {
    display: flex;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-media-container {
    flex: 2;
    /* Takes up 2/3 space */
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lightbox-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-side-panel {
    flex: 1;
    /* Takes up 1/3 space */
    background: white;
    padding: 2rem;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center text vertically */
    overflow-y: auto;
}

.lightbox-side-panel h3 {
    margin-top: 0;
    font-family: 'Playfair Display', serif;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.lightbox-caption {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555;
    font-family: 'Inter', sans-serif;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 2010;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 2010;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.9);
    color: black;
}

.prev {
    left: -70px;
}

.next {
    right: -70px;
}

/* Mobile Lightbox Adjustments */
@media (max-width: 768px) {
    .lightbox-wrapper {
        width: 100%;
        height: 100%;
        max-width: none;
    }

    .lightbox-content-split {
        flex-direction: column;
        /* Stack vertically on mobile */
        border-radius: 0;
    }

    .lightbox-media-container {
        flex: 1;
        /* Media takes available space */
        height: 60%;
    }

    .lightbox-side-panel {
        flex: 0 0 auto;
        height: 40%;
        /* Description takes bottom 40% */
        padding: 1.5rem;
        justify-content: flex-start;
    }

    .lightbox-nav {
        padding: 0.8rem;
        font-size: 1.2rem;
        background: rgba(0, 0, 0, 0.5);
        /* Stronger bg on mobile */
    }

    .prev {
        left: 10px;
    }

    .next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }
}

/* --- Mobile Responsiveness --- */

/* Mobile Nav Toggle Button (Hidden on Desktop) */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1100;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.mobile-nav-toggle:active {
    transform: scale(0.95);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .content {
        margin-left: 240px;
        padding: 2rem;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {

    /* Toggle Button Visible */
    .mobile-nav-toggle {
        display: flex;
    }

    /* Sidebar Off-Canvas */
    .sidebar {
        position: fixed;
        /* Force fixed to override any legacy relative */
        transform: translateX(-100%);
        width: 280px;
        z-index: 1100;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
        height: 100vh;
        top: 0;
        left: 0;
    }

    /* Sidebar Active State */
    .sidebar.active {
        transform: translateX(0);
    }

    /* Content Full Width */
    .content {
        margin-left: 0;
        padding: 1.5rem 1rem;
        width: 100%;
        margin-top: 60px;
        /* Space for top bar/toggle if needed */
    }

    /* Reset Header Margins */
    h1 {
        font-size: 1.75rem;
        margin-top: 0;
    }

    h2 {
        font-size: 1.4rem;
    }

    /* Grid Stacking */
    .grid,
    .stats-grid,
    .media-grid {
        grid-template-columns: 1fr !important;
        /* Force single column */
        gap: 1.5rem;
    }

    /* Cards */
    .media-card,
    .card,
    .stat-card {
        padding: 1.25rem;
    }

    .media-preview {
        height: 200px;
    }

    /* Responsive Tables */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-collapse: collapse;
    }

    th,
    td {
        padding: 0.75rem;
    }

    /* Form Elements */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px;
        /* ISO standard to prevent zoom */
        padding: 0.8rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }

    .filter-group {
        width: 100%;
        margin: 0;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
    }

    /* Notifications Page */
    .notif-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .notif-item form {
        width: 100%;
    }

    .notif-item button {
        width: 100%;
        margin-top: 0.5rem;
    }

    /* Public Header */
    .header-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        /* Stack links on mobile */
        gap: 0.75rem;
        width: 100%;
    }

    .nav-links a {
        margin-left: 0;
        padding: 0.5rem;
        border-bottom: 1px solid #eee;
        display: block;
    }
}