/*
 * admin.css — 小胖球后台管理系统
 * 字体本地化 + CSS 变量 + 全局基础样式
 *
 * 依赖：
 *   assets/fonts/inter/          (Inter 400/500/600)
 *   assets/fonts/manrope/        (Manrope 700/800)
 *   assets/fonts/material-symbols/ (MaterialSymbolsOutlined)
 */

/* ─── 1. 本地字体声明 ─────────────────────────────────────── */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter/inter-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter/inter-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter/inter-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/manrope/manrope-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/manrope/manrope-800.woff2') format('woff2');
}

@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
    src: url('../fonts/material-symbols/MaterialSymbolsOutlined.woff2') format('woff2');
}

/* ─── 2. Material Symbols 基础设置 ──────────────────────────── */

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined', sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL'0, 'wght'400, 'GRAD'0, 'opsz'24;
}

/* ─── 3. 主题字体帮助类 ─────────────────────────────────────── */

.font-jinbuti {
    font-family: 'Manrope', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 800;
}

.font-display {
    font-family: 'Manrope', sans-serif;
}

/* ─── 4. 全局基础 ────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── 5. 自定义滚动条 ─────────────────────────────────────── */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f6f3f2;
}

::-webkit-scrollbar-thumb {
    background: #bbcbb9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6d7b6b;
}

/* ─── 6. 侧边栏子菜单动画 ─────────────────────────────────── */

.xpq-submenu {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease-out, opacity 0.2s ease;
    opacity: 0;
}

.xpq-submenu.open {
    max-height: 300px;
    opacity: 1;
    transition: max-height 0.3s ease-in, opacity 0.2s ease;
}

.xpq-chevron {
    transition: transform 0.25s ease;
}

.xpq-chevron.open {
    transform: rotate(180deg);
}

/* ─── 7. 弹窗遮罩淡入 ────────────────────────────────────── */

.xpq-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    backdrop-filter: blur(4px);
    animation: xpq-fadeIn 0.15s ease;
}

.xpq-modal-overlay.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes xpq-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.xpq-modal-box {
    animation: xpq-slideUp 0.2s ease;
}

@keyframes xpq-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── 8. Toast 通知 ──────────────────────────────────────── */

#xpq-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.xpq-toast-item {
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: xpq-toastIn 0.25s ease forwards;
    pointer-events: auto;
}

.xpq-toast-item.success {
    background: #006e2d;
}

.xpq-toast-item.error {
    background: #ba1a1a;
}

.xpq-toast-item.info {
    background: #1c1b1b;
}

@keyframes xpq-toastIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}