/* ============================================================
 * boGPT 统一设计令牌
 * 与商城前台（boGPT storefront）保持完全一致的视觉语言：
 *   Geist 字体 · Apple 中性灰阶 · #0071e3 主色 · 12px 基准圆角
 *
 * 重要：变量名沿用充值站既有命名，仅替换取值，
 *       以确保 style.css / admin.html 中上万行既有样式无需改写。
 * ============================================================ */

/* ---------- 字体：与商城同源（Geist Variable） ---------- */
@font-face {
    font-family: 'Geist Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/ops/fonts/geist-latin.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
        U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Geist Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/ops/fonts/geist-latin-ext.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
        U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
        U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- 令牌 ---------- */
:root {
    /* 主色 —— 商城 --primary: #0071e3 */
    --primary: #0071e3;
    --primary-hover: #0062c4;
    --primary-soft: #f2f8ff;
    --primary-glow: rgba(0, 113, 227, 0.18);
    --accent: #0071e3;
    --accent-soft: #f2f8ff;
    --accent-glow: rgba(0, 113, 227, 0.18);

    /* 中性色 —— 商城 background #fafafa / card #fff / border #e5e5e8 */
    --bg-page: #fafafa;
    --bg-dark: #080808;
    --bg: #fafafa;
    --surface: #ffffff;
    --surface-soft: #f7f7f8;
    --surface-hover: #f3f3f5;
    --glass: #ffffff;
    --glass-border: #e5e5e8;
    --border: #e5e5e8;
    --border-strong: #dedee3;
    --divider: #f0f0f2;
    --panel: #ffffff;
    --card-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --sidebar-width: 260px;
    --selected-surface: #f2f8ff;
    --header-surface: rgba(250, 250, 250, 0.88);

    /* 文本 —— 商城 foreground #1d1d1f / muted #6e6e73 */
    --text: #1d1d1f;
    --text-main: #1d1d1f;
    --text-secondary: #424245;
    --text-dim: #6e6e73;
    --text-muted: #86868b;

    /* 状态色 —— 与商城 --success/--warning 对齐 */
    --success: #25804d;
    --success-soft: #edf7f1;
    --error: #e7000b;
    --error-soft: #fff0f0;
    --warning: #966018;
    --warning-soft: #fbf4e8;
    --info: #0a84ff;
    --info-soft: #eef6ff;

    /* 阴影 —— 商城使用极轻投影 0 4px 22px #00000003 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow: 0 4px 22px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
    --shadow-focus: 0 0 0 4px rgba(0, 113, 227, 0.14);

    /* 圆角 —— 商城 --radius: .75rem */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* ---------- 深色外观（与商城 .dark 对齐） ---------- */
.dark {
    --primary: #f1f1f1;
    --primary-hover: #ffffff;
    --primary-soft: #202020;
    --primary-glow: rgba(241, 241, 241, 0.14);
    --accent: #242424;
    --accent-soft: #202020;
    --accent-glow: rgba(241, 241, 241, 0.14);

    --bg-page: #080808;
    --bg: #080808;
    --surface: #111111;
    --surface-soft: #161616;
    --surface-hover: #1a1a1a;
    --glass: #111111;
    --glass-border: #282828;
    --border: #282828;
    --border-strong: #383838;
    --divider: #242424;
    --panel: #111111;
    --card-bg: #111111;
    --sidebar-bg: #111111;
    --selected-surface: #202020;
    --header-surface: rgba(8, 8, 8, 0.88);

    --text: #ededed;
    --text-main: #ededed;
    --text-secondary: #c7c7c7;
    --text-dim: #939393;
    --text-muted: #6f6f6f;

    --success: #91c9a6;
    --success-soft: #16221b;
    --error: #ff6961;
    --error-soft: #2a1416;
    --warning: #d6b67d;
    --warning-soft: #27221a;
    --info: #6cb6ff;
    --info-soft: #16202b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 22px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
    --shadow-focus: 0 0 0 4px rgba(176, 176, 176, 0.2);
}

/* ---------- 字体族统一 ---------- */
html,
body,
button,
input,
select,
textarea {
    font-family: 'Geist Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI',
        'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* ---------- 与商城一致的滚动条观感 ---------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
    background-clip: content-box;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ============================================================
 * 商城同款站点骨架：顶栏 + 页脚
 * 取自 boGPT storefront App.css，类名与视觉保持一致
 * ============================================================ */
.page-width { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }

.site-header {
    height: 76px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--header-surface);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    width: min(1280px, calc(100% - 80px));
    height: 100%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
    font-size: 21px;
    white-space: nowrap;
    letter-spacing: -.8px;
    color: var(--text-main);
    text-decoration: none;
}

.brand svg { width: 33px; height: 33px; color: var(--text-main); }
.brand .brand-picture{display:block;width:112px;height:auto;max-height:46px;object-fit:contain}
.brand-ai { font-weight: 450; margin-left: 5px; letter-spacing: -.8px; }

.header-inner nav {
    display: flex;
    align-items: center;
    gap: 34px;
    height: 100%;
    margin-left: 45px;
}

.nav-link {
    font-size: 13px;
    color: var(--text-dim);
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .15s;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.nav-link:hover,
.nav-link.selected { color: var(--text-main); }

.nav-link.selected:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--text-main);
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions>button,
.header-actions>a {
    height: 44px;
    min-height: 44px;
    line-height: 20px;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--text-main);
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    font-family: inherit;
    transition: background .15s;
}

.header-actions>button:hover,
.header-actions>a:hover { background: var(--surface-hover); }

.header-divider { width: 1px; height: 18px; background: var(--border); }

.header-note { color: var(--text-dim); font-size: 13px; font-weight: 450; }

.site-footer { border-top: 1px solid var(--border); margin-top: auto; }
.footer-top { display: flex; align-items: center; gap: 27px; padding: 27px 0; }
.footer-top>span { color: var(--text-dim); font-size: 10px; }
.footer-top>.text-button { margin-left: auto; color: var(--text-dim); font-size: 10px; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding: 0 0 25px;
    font-size: 9px;
    color: var(--text-dim);
    gap: 20px;
}
.footer-bottom>div { display: flex; gap: 20px; }
.footer-bottom button {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.text-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-main);
    transition: opacity .15s;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.text-button:hover { opacity: .65; }

.site-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.site-shell>main { flex: 1; }

@media (max-width: 760px) {
    .page-width, .header-inner { width: calc(100% - 40px); }
    .site-header { height: 66px; }
    .brand { font-size: 19px; }
    .brand svg { width: 29px; height: 29px; }
    .header-inner { gap: 10px; }
    .header-inner nav { gap: 18px; margin-left: auto; }
    .nav-link { font-size: 11px; }
    .header-divider, .header-note { display: none; }
    .header-actions { gap: 0; }
    .footer-top { flex-wrap: wrap; gap: 15px; padding: 22px 0; }
    .footer-top>span { order: 3; width: 100%; font-size: 10px; }
    .footer-bottom { flex-direction: column; gap: 13px; font-size: 9px; }
    .footer-bottom>div { gap: 22px; }
}
