<?php
/*** 版权完整性校验 (盗版检测+水印) - 后台 ***/
if (!defined('PPQ_ROOT')) define('PPQ_ROOT', __DIR__ . '/../../');
include(__DIR__ . '/../Public/Integrity.php');
?>
<div class="header">
        <div class="header-left">
            <button class="mobile-toggle" id="mobileToggle">
                <i class="fa fa-bars"></i>
            </button>
        </div>
        <div class="header-right">
            <a href="/" target="_blank" class="header-icon" rel="noopener">
                <i class="fa fa-tachometer"></i><span class="header-text">首页</span>
            </a>
            <a href="?Php=Cancellation" class="header-icon">
                <i class="fa fa-sign-out"></i><span class="header-text">退出</span>
            </a>
            <div class="user-profile">
                <div class="user-avatar">A</div>
                <div class="user-name">管理员</div>
            </div>
            </div>
            </div>

            <!-- PPQCMS 后台统一主题：深海军蓝 + 鼠尾草绿 + 暖白 -->
            <style id="ppq-admin-theme">
            :root{
                --ppq-primary:#223047;
                --ppq-primary-dark:#172133;
                --ppq-accent:#3D927E;
                --ppq-accent-dark:#2F7566;
                --ppq-bg:#EEF2F1;
                --ppq-card:#FFFDF9;
                --ppq-line:#DCE5E1;
                --ppq-text:#223047;
                --ppq-text-2:#718096;
                --primary-color:#223047!important;
                --secondary-color:#3D927E!important;
                --success-color:#3D927E!important;
                --warning-color:#C9953D!important;
                --light-color:#EEF2F1!important;
                --dark-color:#223047!important;
            }
            /* 侧边栏 / 顶栏 */
            .sidebar, .admin-sidebar, .menu-box, .left-menu{
                background:linear-gradient(180deg,#223047 0%,#172133 100%)!important;
                color:#fff!important;
            }
            .header, .top-bar, .admin-header{
                background:#223047!important;
                color:#fff!important;
                box-shadow:0 2px 12px rgba(23,33,51,.18)!important;
            }
            /* 主区背景 */
            body, .admin-body, .main-wrap, .main-content, .content, .content-wrapper{
                background:var(--ppq-bg)!important;
                color:var(--ppq-text)!important;
            }
            /* 侧栏顶部和菜单 */
            .sidebar-header{
                background:var(--ppq-primary)!important;
                border-bottom:1px solid rgba(255,255,255,.12)!important;
            }
            .sidebar .logo-text, .sidebar .logo i{
                color:#FFFFFF!important;
            }
            .sidebar .sidebar-menu{
                background:transparent!important;
            }
            .sidebar .menu-item, .sidebar .submenu-item{
                background:transparent!important;
                color:#DCE8E4!important;
                border-left-color:transparent!important;
            }
            .sidebar .menu-item i, .sidebar .submenu-item i,
            .sidebar .menu-item .fa-angle-down{
                color:#A8C2B9!important;
            }
            .sidebar .menu-item:hover, .sidebar .submenu-item:hover{
                background:rgba(255,255,255,.08)!important;
                color:#FFFFFF!important;
                border-left-color:#B8DED2!important;
            }
            .sidebar .menu-item.active, .sidebar .menu-item.selected,
            .sidebar .submenu-item.active, .sidebar .submenu-item.selected,
            .left-menu .active a, .menu-box .active{
                background:var(--ppq-accent)!important;
                color:#FFFFFF!important;
                border-left-color:#E1F2EB!important;
            }
            .sidebar .menu-item.active i, .sidebar .menu-item.selected i,
            .sidebar .submenu-item.active i, .sidebar .submenu-item.selected i{
                color:#FFFFFF!important;
            }
            .sidebar .submenu{
                background:rgba(0,0,0,.12)!important;
                border-left-color:rgba(255,255,255,.1)!important;
            }
            .sidebar .menu-badge{
                background:#C9953D!important;
            }
            /* 正文卡片、表格与提示区域 */
            .usage-guide, .stat-card, .info-card, .panel, .card, .box,
            .settings-card, .content-card, .form-card, .table-card,
            .section-card, .admin-card, .data-card, .list-card{
                background:var(--ppq-card)!important;
                border:1px solid var(--ppq-line)!important;
                border-radius:10px!important;
                box-shadow:0 8px 22px rgba(34,48,71,.07)!important;
            }
            .card-header, .panel-header, .section-header,
            .settings-card-header, .content-card-header{
                background:#EDF4F1!important;
                border-bottom-color:#DCE5E1!important;
                color:var(--ppq-primary)!important;
            }
            .breadcrumb, .page-subtitle, .text-muted{ color:var(--ppq-text-2)!important; }
            .breadcrumb a{ color:var(--ppq-accent)!important; }
            /* 表单 */
            input[type="text"], input[type="password"], input[type="number"],
            input[type="url"], select, textarea{
                background:#FFFFFF!important;
                border-color:#CFDAD6!important;
                color:var(--ppq-text)!important;
                border-radius:7px!important;
            }
            input:focus, select:focus, textarea:focus{
                border-color:var(--ppq-accent)!important;
                box-shadow:0 0 0 3px rgba(61,146,126,.14)!important;
                outline:none!important;
            }
            /* 主按钮与状态 */
            .btn-primary, .btn-success, .am-btn-primary, .am-btn-success{
                background:var(--ppq-accent)!important;
                border-color:var(--ppq-accent)!important;
                color:#FFFFFF!important;
            }
            .btn-primary:hover, .btn-success:hover, .am-btn-primary:hover, .am-btn-success:hover{
                background:var(--ppq-accent-dark)!important;
                border-color:var(--ppq-accent-dark)!important;
                color:#FFFFFF!important;
            }
            .btn-warning, .am-btn-warning{ background:#C9953D!important; border-color:#C9953D!important; }
            .alert-warning, .am-alert-warning{
                background:#FFF8E8!important;
                border-color:#EEDAA7!important;
                color:#7A5A1C!important;
            }
            .alert-success, .am-alert-success{
                background:#E8F3EF!important;
                border-color:#B9DCCC!important;
                color:var(--ppq-accent-dark)!important;
            }
            /* 统计卡图标 */
            .stat-icon{
                background:var(--ppq-accent)!important;
            }
            .header a, .header .header-icon, .header .user-name{
                color:#F7FAF9!important;
            }
            .header .header-icon:hover{ color:#B8DED2!important; }
            .header .user-avatar{ background:#3D4C62!important; color:#FFFFFF!important; }
            @media (max-width:768px){
                .sidebar-header{ background:var(--ppq-primary)!important; }
                .sidebar-header .logo-text, .sidebar-header .logo i{ color:#FFFFFF!important; }
            }
            </style>


            <style id="ppq-header-layout">
            /* PPQCMS 后台顶栏布局：
               之前因为这段被覆盖丢了，导致"首页 / 退出 / A / 管理员"
               几个元素被压成一团、文本换行。这里只补布局，颜色仍由
               #ppq-admin-theme 负责。!important 是为了胜过某些后台页
               在自己 <style> 里写的同选择器（不带 !important）。 */
            .header{display:flex;align-items:center;justify-content:space-between;padding:0 24px;min-height:60px}
            .header-left{display:flex;align-items:center;gap:16px}
            .header-right{display:flex!important;align-items:center!important;gap:20px!important;margin-left:auto}
            .header-icon{display:inline-flex!important;align-items:center!important;gap:7px!important;white-space:nowrap!important;font-size:14px!important;line-height:1!important;text-decoration:none!important;transition:color .2s ease}
            .header-icon i{font-size:14px!important;line-height:1!important;width:14px;text-align:center;display:inline-block}
            .header-icon:hover{color:#B8DED2!important}
            .user-profile{display:flex!important;align-items:center!important;gap:10px!important;white-space:nowrap!important;cursor:pointer}
            .user-avatar{width:40px!important;height:40px!important;border-radius:50%!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:14px!important;font-weight:600!important;flex:0 0 40px!important;line-height:1!important}
            .user-name{font-size:14px!important;font-weight:500!important;line-height:1!important;white-space:nowrap!important;letter-spacing:.02em}
            .mobile-toggle{display:none;background:none;border:0;color:#fff;font-size:18px;cursor:pointer;padding:6px 10px;line-height:1}
            @media (max-width:768px){
                .mobile-toggle{display:inline-flex;align-items:center;justify-content:center}
                .header-text{display:none!important}
                .user-name{display:none!important}
                .header{padding:0 14px;min-height:54px;gap:12px}
                .header-right{gap:12px!important}
            }
            </style>
