<?php
$static_url = dirname($_SERVER['SCRIPT_NAME']) . '/assets/';
?>

<!DOCTYPE html>
<html lang="en">

<head>
    <title><?php echo isset($page_title) ? $page_title : "IBO PLAY PLUS"; ?></title>
    <meta charset="utf-8" />
    <meta name="description" content="İş Güvenlik Kontrol Sistemi" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="shortcut icon" href="<?php echo $static_url; ?>media/logos/logo.png" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700" />
    <link href="<?php echo $static_url; ?>plugins/custom/fullcalendar/fullcalendar.bundle.css" rel="stylesheet" />
    <link href="<?php echo $static_url; ?>plugins/custom/datatables/datatables.bundle.css" rel="stylesheet" />
    <link href="<?php echo $static_url; ?>plugins/global/plugins.bundle.css" rel="stylesheet" />
    <link href="<?php echo $static_url; ?>css/style.bundle.css" rel="stylesheet" />
    <link href="<?php echo $static_url; ?>css/custom_style.css" rel="stylesheet" />

    <style>
    /* ════════════════════════════
       FOOTER DARK
    ════════════════════════════ */
    #kt_app_footer {
        background: rgba(13,17,23,0.95) !important;
        border-top: 1px solid rgba(99,179,237,0.08) !important;
        padding: 0 !important;
    }
    #kt_app_footer .app-container {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }
    .footer-copy {
        color: rgba(148,163,184,0.45);
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .footer-copy a {
        color: rgba(148,163,184,0.6);
        text-decoration: none;
        font-weight: 600;
        transition: color 0.2s ease;
    }
    .footer-copy a:hover { color: #63b3ed; }

    .btn-whatsapp-support {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: linear-gradient(135deg, #128c7e, #25d366);
        border: none;
        border-radius: 50px;
        color: #fff !important;
        font-size: 12px;
        font-weight: 700;
        padding: 7px 16px;
        text-decoration: none !important;
        transition: all 0.2s ease;
        box-shadow: 0 4px 14px rgba(37,211,102,0.25);
        letter-spacing: 0.02em;
    }
    .btn-whatsapp-support:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(37,211,102,0.4);
        color: #fff !important;
    }
    .btn-whatsapp-support svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
    .footer-pulse {
        width: 7px; height: 7px;
        background: #fff;
        border-radius: 50%;
        opacity: 0.85;
        animation: fp 1.8s ease-in-out infinite;
        flex-shrink: 0;
    }
    @keyframes fp {
        0%, 100% { opacity: 0.85; transform: scale(1); }
        50%       { opacity: 0.4;  transform: scale(0.7); }
    }
    </style>
</head>

<body id="kt_app_body" data-kt-app-sidebar-enabled="true" data-kt-app-sidebar-fixed="true"
    data-kt-app-sidebar-push-header="true" data-kt-app-sidebar-push-toolbar="true"
    data-kt-app-sidebar-push-footer="true" class="app-default">
    <script>var defaultThemeMode = "light"; var themeMode; if (document.documentElement) { if (document.documentElement.hasAttribute("data-bs-theme-mode")) { themeMode = document.documentElement.getAttribute("data-bs-theme-mode"); } else { if (localStorage.getItem("data-bs-theme") !== null) { themeMode = localStorage.getItem("data-bs-theme"); } else { themeMode = defaultThemeMode; } } if (themeMode === "system") { themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } document.documentElement.setAttribute("data-bs-theme", themeMode); }</script>
    <div class="d-flex flex-column flex-root app-root" id="kt_app_root">
        <div class="app-page flex-column flex-column-fluid" id="kt_app_page">
            <?php include 'includes/header.php'; ?>
            <div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper">
            <?php include 'includes/sidebar.php'; ?>
                <div class="app-main flex-column flex-row-fluid" id="kt_app_main">
                    <div class="d-flex flex-column flex-column-fluid">
                        <div id="kt_app_content" class="app-content flex-column-fluid">
                            <div id="kt_app_content_container" class="app-container container-fluid">
                                <?php
                                echo isset($page_content) ? $page_content : "<h1>İçerik bulunamadı</h1>";
                                ?>
                            </div>
                        </div>
                    </div>

                    <div id="kt_app_footer" class="app-footer">
                        <div class="app-container container-fluid d-flex flex-column flex-md-row flex-center flex-md-stack py-3">

                            <!-- COPYRIGHT -->
                            <div class="footer-copy order-2 order-md-1">
                                <span>2026&copy;</span>
                                <a href="https://wa.me/5561999831994?text=Olá%2C%20preciso%20de%20suporte%20com%20o%20painel PlayPlus." target="_blank">PlayPlus</a>
                                <span style="color:rgba(99,179,237,0.2);margin:0 4px;">|</span>
                                <span>Todos os direitos reservados</span>
                            </div>

                            <!-- SUPORTE WHATSAPP -->
                            <div class="order-1 order-md-2 mb-3 mb-md-0">
                                <a href="https://wa.me/5561999831994?text=Olá%2C%20preciso%20de%20suporte%20com%20o%20painel PlayPlus."
                                   target="_blank"
                                   class="btn-whatsapp-support">
                                    <!-- WhatsApp icon SVG -->
                                    <svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                                        <path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
                                    </svg>
                                    <span class="footer-pulse"></span>
                                    Suporte
                                </a>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="kt_scrolltop" class="scrolltop" data-kt-scrolltop="true">
        <span class="svg-icon">
            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                <rect opacity="0.5" x="13" y="6" width="13" height="2" rx="1" transform="rotate(90 13 6)"
                    fill="currentColor"></rect>
                <path
                    d="M12.5657 8.56569L16.75 12.75C17.1642 13.1642 17.8358 13.1642 18.25 12.75C18.6642 12.3358 18.6642 11.6642 18.25 11.25L12.7071 5.70711C12.3166 5.31658 11.6834 5.31658 11.2929 5.70711L5.75 11.25C5.33579 11.6642 5.33579 12.3358 5.75 12.75C6.16421 13.1642 6.83579 13.1642 7.25 12.75L11.4343 8.56569C11.7467 8.25327 12.2533 8.25327 12.5657 8.56569Z"
                    fill="currentColor"></path>
            </svg>
        </span>
    </div>

    <script src="<?php echo $static_url; ?>plugins/global/plugins.bundle.js"></script>
    <script src="<?php echo $static_url; ?>js/scripts.bundle.js"></script>
    <script src="<?php echo $static_url; ?>plugins/custom/datatables/datatables.bundle.js"></script>
    <script src="<?php echo $static_url; ?>js/widgets.js"></script>
</body>

</html>