<?php
$page_title = 'Media Studio';
require_once __DIR__ . '/../config.php';
if (session_status() === PHP_SESSION_NONE) { session_start(); }
if (!isset($_SESSION['admin_id'])) { redirect(SITE_URL . '/admin/login.php'); }
require_once __DIR__ . '/header.php';
?>
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:24px;">
    <div>
        <h2 style="font-family:'Outfit',sans-serif; font-size:1.8rem; color:#0f172a; margin:0;"><i class="fas fa-photo-video" style="color:#ec4899; margin-right:10px;"></i>Media Studio</h2>
        <p style="color:#64748b; font-size:0.95rem; margin-top:5px;">DAM, video CMS, brand assets, campaign content, and creative workflows.</p>
    </div>
    <button style="background:linear-gradient(135deg,#ec4899,#be185d); color:#fff; border:none; padding:10px 20px; border-radius:8px; font-size:0.9rem; cursor:pointer; font-weight:600;"><i class="fas fa-upload"></i> Upload Media</button>
</div>
<div class="grid-4" style="margin-bottom:24px;">
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; border-top:4px solid #ec4899;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">TOTAL ASSETS</div>
        <div style="font-size:1.6rem; font-weight:700; color:#0f172a;">8,420</div>
        <div style="color:#ec4899; font-size:0.8rem; margin-top:5px;"><i class="fas fa-images"></i> Photos + Videos</div>
    </div>
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; border-top:4px solid #3b82f6;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">VIDEO LIBRARY</div>
        <div style="font-size:1.6rem; font-weight:700; color:#0f172a;">240</div>
        <div style="color:#3b82f6; font-size:0.8rem; margin-top:5px;"><i class="fas fa-video"></i> Product + Training</div>
    </div>
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; border-top:4px solid #f59e0b;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">BRAND ASSETS</div>
        <div style="font-size:1.6rem; font-weight:700; color:#0f172a;">1,840</div>
        <div style="color:#f59e0b; font-size:0.8rem; margin-top:5px;"><i class="fas fa-palette"></i> Logos + Templates</div>
    </div>
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; border-top:4px solid #10b981;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">PENDING APPROVALS</div>
        <div style="font-size:1.6rem; font-weight:700; color:#0f172a;">18</div>
        <div style="color:#10b981; font-size:0.8rem; margin-top:5px;"><i class="fas fa-check-double"></i> Creative Review</div>
    </div>
</div>
<div class="grid-2">
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0;">
        <h3 style="margin:0 0 15px; font-size:1.15rem; color:#0f172a;"><i class="fas fa-folder-open" style="color:#ec4899; margin-right:8px;"></i>Asset Libraries</h3>
        <?php
        $libs = [
            ['Product Photography', '4,240 photos', '#ec4899', 'fas fa-camera'],
            ['Video Studio CMS', '240 videos', '#3b82f6', 'fas fa-film'],
            ['Brand Asset Library', '1,840 assets', '#f59e0b', 'fas fa-palette'],
            ['Campaign Content Vault', '1,280 creatives', '#8b5cf6', 'fas fa-bullhorn'],
            ['Social Media Kit', '820 posts', '#10b981', 'fas fa-share-alt'],
        ];
        foreach ($libs as $l): ?>
        <div style="border:1px solid #e2e8f0; border-radius:8px; padding:12px 15px; margin-bottom:10px; display:flex; justify-content:space-between; align-items:center; cursor:pointer; transition:all 0.2s;" onmouseover="this.style.background='#f8fafc'" onmouseout="this.style.background='#fff'">
            <div style="display:flex; align-items:center; gap:12px;">
                <i class="<?= $l[3] ?>" style="color:<?= $l[2] ?>; font-size:1.1rem;"></i>
                <span style="font-weight:600; font-size:0.9rem;"><?= $l[0] ?></span>
            </div>
            <div style="display:flex; align-items:center; gap:8px;">
                <span style="color:#64748b; font-size:0.8rem;"><?= $l[1] ?></span>
                <i class="fas fa-chevron-right" style="color:#cbd5e1; font-size:0.8rem;"></i>
            </div>
        </div>
        <?php endforeach; ?>
    </div>
    <div style="display:flex; flex-direction:column; gap:24px;">
        <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0;">
            <h3 style="margin:0 0 15px; font-size:1.15rem; color:#0f172a;"><i class="fas fa-tasks" style="color:#8b5cf6; margin-right:8px;"></i>Creative Workflow</h3>
            <div style="border-left:3px solid #f59e0b; padding-left:12px; margin-bottom:12px;">
                <div style="font-weight:600; font-size:0.9rem;">Monsoon Campaign Creatives</div>
                <div style="font-size:0.8rem; color:#64748b;">8 designs · Awaiting brand approval</div>
            </div>
            <div style="border-left:3px solid #10b981; padding-left:12px; margin-bottom:12px;">
                <div style="font-weight:600; font-size:0.9rem;">Product Catalog Photoshoot</div>
                <div style="font-size:0.8rem; color:#64748b;">42 products · Completed</div>
            </div>
            <div style="border-left:3px solid #3b82f6; padding-left:12px;">
                <div style="font-weight:600; font-size:0.9rem;">Training Video Series</div>
                <div style="font-size:0.8rem; color:#64748b;">Episode 8 of 12 · In production</div>
            </div>
        </div>
        <div style="background:linear-gradient(135deg,#ec4899,#be185d); color:#fff; padding:20px; border-radius:12px;">
            <h3 style="margin:0 0 8px; font-size:1.1rem;"><i class="fas fa-hdd"></i> Storage Usage</h3>
            <div style="font-size:2rem; font-weight:700; margin-bottom:5px;">1.8 TB</div>
            <div style="background:rgba(255,255,255,0.2); height:8px; border-radius:4px; overflow:hidden;">
                <div style="width:72%; height:100%; background:#fff; border-radius:4px;"></div>
            </div>
            <div style="font-size:0.8rem; opacity:0.8; margin-top:5px;">72% of 2.5 TB</div>
        </div>
    </div>
</div>
<?php require_once __DIR__ . '/footer.php'; ?>
