/* ========================================================
   TingYun Access — 全局统一样式表
   设计语言：Modern Admin (Tailwind 调色级)
   覆盖：登录页 / 安装页 / C端购卡 / 支付结果 / 充值页
   与 cards.css 共享同一套 CSS 变量
======================================================== */

/* ---------- 统一字体 ---------- */
/* 已移除 Google Fonts 外部导入（国内网络不可达），改由系统字体栈渲染 */

/* ---------- 统一 CSS 变量 ---------- */
:root {
    /* 核心品牌色系 (Modern Blue) — 与 cards.css 对齐 */
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-primary-bg: #eff6ff;
    --color-primary-dark: #1d4ed8;

    /* 渐变主题色（C端页面用） */
    --gradient-start: #667eea;
    --gradient-end: #764ba2;

    /* 语义色系 */
    --color-success: #10b981;
    --color-success-bg: #ecfdf5;
    --color-success-border: #a7f3d0;

    --color-warning: #f59e0b;
    --color-warning-bg: #fffbeb;
    --color-warning-border: #fde68a;

    --color-error: #f43f5e;
    --color-error-bg: #fff1f2;
    --color-error-border: #fecdd3;

    --color-info: #6366f1;
    --color-info-bg: #eef2ff;

    /* 灰度盘 */
    --bg-layout: #f8fafc;
    --bg-container: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-active: #e2e8f0;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;

    --border-color: #f1f5f9;
    --border-color-input: #e2e8f0;

    /* 圆角 */
    --radius-sm: 6px;
    --radius-base: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.02), 0 4px 12px 0 rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-base: 16px;
    --space-lg: 20px;
    --space-xl: 24px;
    --space-2xl: 32px;

    /* 管理端布局变量（Admin Dashboard） */
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 80px;
    --header-height: 64px;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background-color: #f8fafc; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, sans-serif;
    background-color: var(--bg-layout);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: color 0.2s;
}
a:hover { color: var(--color-primary-hover); }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- 通用组件 ---------- */

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    touch-action: manipulation;
    border-radius: var(--radius-base);
    border: 1px solid transparent;
    font-size: 14px;
    padding: 8px 16px;
    height: 36px;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
    color: #fff;
    background-color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-gradient {
    color: #fff;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}
.btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.btn-default {
    color: var(--text-primary);
    background-color: #fff;
    border-color: var(--border-color-input);
    box-shadow: var(--shadow-sm);
}
.btn-default:hover {
    color: var(--color-primary);
    border-color: #93c5fd;
    background-color: var(--color-primary-bg);
}

.btn-danger {
    color: var(--color-error);
    background-color: #fff;
    border-color: var(--color-error-border);
    box-shadow: var(--shadow-sm);
}
.btn-danger:hover {
    background-color: var(--color-error);
    color: #fff;
    border-color: var(--color-error);
}

.btn-success {
    color: #fff;
    background-color: var(--color-success);
}
.btn-success:hover { background-color: #059669; }

/* 输入框 */
.input, .select, .textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #fff;
    border: 1px solid var(--border-color-input);
    border-radius: var(--radius-base);
    transition: all 0.2s ease;
}
.input:hover, .select:hover, .textarea:hover {
    border-color: #cbd5e1;
}
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}
.input::placeholder, .textarea::placeholder {
    color: var(--text-tertiary);
}

/* 卡片 */
.card {
    background: var(--bg-container);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-body { padding: 24px; }

/* 标签 Tag */
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color-input);
    background: #f8fafc;
    color: var(--text-secondary);
    white-space: nowrap;
}
.tag-primary { color: var(--color-primary); background: var(--color-primary-bg); border-color: #bfdbfe; }
.tag-success { color: var(--color-success); background: var(--color-success-bg); border-color: var(--color-success-border); }
.tag-error { color: var(--color-error); background: var(--color-error-bg); border-color: var(--color-error-border); }
.tag-warning { color: var(--color-warning); background: var(--color-warning-bg); border-color: var(--color-warning-border); }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table {
    width: 100%;
    text-align: left;
    border-collapse: separate;
    border-spacing: 0;
}
.table th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color-input);
    white-space: nowrap;
}
.table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: background 0.2s;
    font-size: 13.5px;
}
.table tr:hover td { background: var(--bg-hover); }

/* 弹窗 Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 18px;
    font-weight: 600;
}
.modal-body { padding: 24px; }
@keyframes modalIn {
    0% { transform: scale(0.95) translateY(10px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Toast - 通用样式（基础） */
.toast-container {
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.toast {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-success { color: var(--color-success); }
.toast-error { color: var(--color-error); }
.toast-warning { color: var(--color-warning); }
@keyframes toastIn {
    0% { transform: translateY(-20px) scale(0.9); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* e-toast - 管理端专用 Toast（独立命名避免冲突） */
.e-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}
.e-toast {
    min-width: 240px;
    max-width: 420px;
    width: auto;
    padding: 12px 20px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.5;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.3s, transform 0.3s;
    animation: eToastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.e-toast i { font-size: 18px; flex-shrink: 0; }
.e-toast-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.e-toast-success i { color: rgba(255,255,255,0.9); }
.e-toast-error { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.e-toast-error i { color: rgba(255,255,255,0.9); }
.e-toast-hide {
    opacity: 0;
    transform: translateY(-12px) scale(0.95);
}
@keyframes eToastIn {
    0% { transform: translateY(-12px) scale(0.92); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
@media (max-width: 600px) {
    .e-toast { min-width: 200px; max-width: 90vw; font-size: 13px; }
}

/* ---------- 通知框样式 ---------- */
.ay-notice {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 13px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ay-notice-warning {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}
.ay-notice-info {
    background: var(--color-primary-bg);
    color: var(--color-primary);
    border-color: rgba(59, 130, 246, 0.2);
}
.ay-notice-error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border-color: var(--color-error-border);
}

/* ---------- 布局工具类 ---------- */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.flex { display: flex; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.w-full { width: 100%; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-tertiary); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }
.text-error { color: var(--color-error); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 登录页玻璃拟态 ---------- */
.glass-bg {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}
.glass-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.glass-card {
    width: min(480px, 92vw);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.glass-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.glass-header {
    padding: 32px 28px 16px;
    text-align: center;
}
.glass-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 8px 26px rgba(102, 126, 234, 0.35);
}
.glass-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}
.glass-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.glass-body {
    padding: 16px 28px 28px;
}

.glass-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}
.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.glass-input:focus {
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.glass-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: all 0.2s ease;
    background: transparent;
    padding: 0 4px;
}
.glass-input:focus + .glass-label,
.glass-input:not(:placeholder-shown) + .glass-label {
    top: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transform: translateY(-50%);
}

.glass-field {
    position: relative;
    margin-bottom: 16px;
}

.glass-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.35);
    transition: transform 0.1s ease, box-shadow 0.2s ease, filter 0.2s;
}
.glass-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(102, 126, 234, 0.45);
}
.glass-btn:active {
    transform: translateY(1px) scale(0.98);
    filter: brightness(0.95);
}

.glass-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 16px;
}

/* ---------- C端购卡页 ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.03);
}
.site-header .logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-header .logo-badge {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-base);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}
.site-header .nav-right { font-size: 13px; color: var(--text-secondary); }
.site-header .nav-right a { color: var(--color-primary); margin-left: 16px; }

.container {
    max-width: 1180px;
    margin: 32px auto;
    padding: 0 20px;
}
.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.page-sub {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 28px;
}

/* 应用卡片网格 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: var(--space-lg);
}
.app-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    box-shadow: var(--shadow-card);
}
.app-card:hover {
    transform: translateY(-2px);
    border-color: #d9e1f2;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.08);
}
.app-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.app-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-base);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}
.app-info { flex: 1; min-width: 0; }
.app-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-id-hint { font-size: 12px; color: var(--text-tertiary); }

/* SKU 商品行 */
.sku-list { display: flex; flex-direction: column; gap: 10px; }
.sku-row {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 44px 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    background: #fafbfd;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}
.sku-row:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
}
.sku-row.selected {
    border-color: var(--color-primary);
    border-width: 2px;
    background: var(--color-primary-bg);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}
.sku-row.selected::after {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    font-weight: 700;
    z-index: 10;
    pointer-events: none;
}
.sku-row .sku-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    pointer-events: none;
}
.sku-row.selected .sku-name {
    color: var(--color-primary);
    font-weight: 600;
}
.sku-row .sku-price {
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 700;
    color: var(--color-error);
    font-size: 15px;
    pointer-events: none;
}
.sku-row .sku-price::before { content: '￥'; font-weight: 500; font-size: 12px; margin-right: 2px; }
.sku-row.selected .sku-price {
    color: var(--color-primary);
}

/* 购买栏 */
.buy-bar {
    margin-top: var(--space-lg);
    padding: 14px 16px;
    background: var(--color-primary-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.qty-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border-color-input);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.qty-btn {
    width: 32px;
    height: 32px;
    border: 0;
    background: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
}
.qty-btn:hover { background: var(--bg-hover); }
.qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.qty-input {
    width: 50px;
    height: 32px;
    border: 0;
    text-align: center;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
    -webkit-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

.channel-select { display: flex; gap: 8px; flex-shrink: 0; }
.channel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color-input);
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s;
}
.channel-btn:hover { border-color: #cbd5e1; }
.channel-btn.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}
.channel-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.channel-btn .ch-icon { font-size: 14px; }
.channel-btn[data-ch="alipay"] .ch-icon::before {
    content: '支';
    background: #1677ff;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}
.channel-btn[data-ch="wechat"] .ch-icon::before {
    content: '微';
    background: #07c160;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

/* 查询密码区域 - 紧凑布局 */
.query-pwd-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    border: 0;
    background: transparent;
    max-width: 240px;
    min-width: 200px;
}
.query-pwd-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    font-weight: 500;
}
.query-pwd-hint { color: var(--color-primary); cursor: help; font-size: 12px; opacity: 0.8; }
.query-pwd-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--border-color-input);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.query-pwd-input:focus { border-color: var(--color-primary); }
.query-pwd-input::placeholder { color: var(--text-tertiary); opacity: 0.85; font-size: 13px; }
.query-pwd-strength { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.strength-bar { flex: 1; height: 4px; background: var(--border-color); border-radius: 2px; overflow: hidden; }
.strength-fill { height: 100%; width: 0; background: #ef4444; transition: width 0.2s, background 0.2s; border-radius: 2px; }
.strength-text { font-size: 12px; color: var(--text-tertiary); min-width: 28px; }
.query-pwd-tips { margin-top: 6px; font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.query-pwd-tips div { padding: 1px 0; }

@media (max-width: 768px) {
    .query-pwd-wrap { max-width: 100%; min-width: 0; }
    .query-pwd-input { font-size: 13px; }
}

.summary {
    margin-left: auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-shrink: 0;
}
.summary .label { font-size: 12px; color: var(--text-secondary); }
.summary .price {
    font-family: 'Consolas', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-error);
}
.summary .price::before { content: '￥'; font-size: 14px; margin-right: 2px; }

.buy-btn {
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    transition: transform 0.1s, opacity 0.15s;
    flex-shrink: 0;
}
.buy-btn:hover { transform: translateY(-1px); }
.buy-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* 空状态 */
.empty-state {
    padding: 80px 0;
    text-align: center;
    color: var(--text-tertiary);
}
.empty-state .icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; color: var(--text-secondary); margin-bottom: 8px; }

/* 支付弹窗 */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}
.modal-mask.show { display: flex; }
.modal-box {
    background: #fff;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalIn 0.25s ease-out;
}
@keyframes modalIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-head h3 { font-size: 16px; font-weight: 600; margin: 0; }
.modal-close {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 0;
    background: var(--bg-hover);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}
.modal-body {
    padding: 28px 24px;
    text-align: center;
}
.qr-wrap {
    display: inline-block;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    margin-bottom: 16px;
}
.qr-wrap canvas { display: block; }
.qr-warn {
    font-size: 13px;
    color: var(--color-error);
    margin-top: 12px;
    min-height: 18px;
}

.pay-info {
    text-align: left;
    background: var(--bg-layout);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}
.pay-info .row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}
.pay-info .label { color: var(--text-tertiary); }
.pay-info .value { font-weight: 500; color: var(--text-primary); }

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-warning);
    margin-right: 6px;
    vertical-align: middle;
    animation: pulse 1.4s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.status-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.status-text.ok { color: var(--color-success); }
.status-text.ok .status-dot { background: var(--color-success); animation: none; }

/* ========================================================
   代理商充值页 (pay_recharge.php)
   ======================================================== */
.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    min-height: 100vh;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: color 0.2s;
}
.back-link:hover { color: var(--color-primary); }

.wrap .page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 8px 0 4px;
}
.page-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

/* 余额卡片 */
.balance-card {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    color: #fff;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}
.balance-label {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.balance-value {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', monospace;
    margin-bottom: 4px;
}
.balance-sub {
    font-size: 12px;
    opacity: 0.75;
}

/* 卡片覆盖通用样式 */
.wrap .card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title i { color: var(--color-primary); }

/* 金额选择网格 */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.amount-item {
    border: 1px solid var(--border-color-input);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s;
    background: #fafbfd;
}
.amount-item:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
}
.amount-item.active {
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}
.amount-item .v {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Consolas', monospace;
}
.amount-item .gift {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
}
.custom-row input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color-input);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
.custom-row input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* 支付渠道列表 */
.channel-list { display: flex; flex-direction: column; gap: 10px; }
.channel-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border-color-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.18s;
    background: #fafbfd;
}
.channel-item:hover {
    border-color: var(--color-primary);
}
.channel-item.active {
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}
.channel-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.channel-icon.ali { background: #1677ff; }
.channel-icon.wx { background: #07c160; }
.channel-body { flex: 1; }
.channel-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.channel-desc { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.check-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-color-input);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 12px;
    transition: all 0.18s;
}
.channel-item.active .check-dot {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

/* 底部支付栏 */
.pay-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
    z-index: 50;
}
.pay-footer .label { font-size: 12px; color: var(--text-tertiary); }
.pay-footer .total {
    font-family: 'Consolas', monospace;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-error);
}
.pay-footer .total::before { content: '￥'; font-size: 14px; margin-right: 2px; font-weight: 500; }
.pay-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    border: 0;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.1s, opacity 0.15s;
}
.pay-btn:hover { transform: translateY(-1px); }
.pay-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* 充值弹窗 */
.modal-card {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalIn 0.25s ease-out;
}
.modal-card .modal-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-card .modal-head .t { font-size: 15px; font-weight: 600; }
.modal-card .modal-close {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 0;
    background: var(--bg-hover);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}
.modal-card .modal-body {
    padding: 24px 20px;
    text-align: center;
}
.qr-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-error);
    font-family: 'Consolas', monospace;
    margin-bottom: 6px;
}
.qr-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.qr-canvas-wrap {
    display: inline-block;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    margin-bottom: 12px;
}
.qr-tip {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.qr-status-paid {
    display: none;
    padding: 12px;
    background: var(--color-success-bg);
    color: var(--color-success);
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 12px;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.qr-status-paid.show { display: flex; }
.qr-order-no {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 8px;
    word-break: break-all;
}

/* ========================================================
   支付结果页 (pay_return.php)
   ======================================================== */
.result-bg {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.result-container {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 560px;
    padding: 36px 32px;
}
.result-header { text-align: center; margin-bottom: 24px; }
.result-header h1 { font-size: 20px; color: var(--text-primary); margin-bottom: 8px; font-weight: 700; }
.result-header .sub { font-size: 12px; color: var(--text-tertiary); }

.status-box {
    text-align: center;
    padding: 28px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.status-box.pending { background: var(--color-warning-bg); color: var(--color-warning); }
.status-box.delivered { background: var(--color-success-bg); color: var(--color-success); }
.status-box.failed,
.status-box.closed { background: var(--color-error-bg); color: var(--color-error); }
.status-box.loading { background: #f8fafc; color: var(--text-secondary); }

.status-box .icon { font-size: 44px; margin-bottom: 10px; line-height: 1; }
.status-box .text { font-size: 17px; font-weight: 600; }
.status-box .hint { font-size: 12px; margin-top: 6px; opacity: 0.8; }

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}
.info-row .label { color: var(--text-tertiary); }
.info-row .value { color: var(--text-primary); font-weight: 500; word-break: break-all; text-align: right; }

.cards-section { margin-top: 20px; }
.cards-section h3 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
    font-weight: 600;
}
.card-item {
    background: #f8fafc;
    border: 1px dashed var(--border-color-input);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    letter-spacing: 1px;
}
.card-item .code { flex: 1; word-break: break-all; }
.card-item .copy-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    margin-left: 12px;
    white-space: nowrap;
    transition: background 0.2s;
}
.card-item .copy-btn:hover { background: var(--color-primary-hover); }
.card-item .copy-btn.ok { background: var(--color-success); }

.result-actions { margin-top: 24px; text-align: center; }
.result-actions .btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin: 0 8px;
    transition: background 0.2s;
    border: 0;
    cursor: pointer;
}
.result-actions .btn:hover { background: var(--color-primary-hover); }
.result-actions .btn.secondary { background: var(--color-info); }
.result-actions .btn.secondary:hover { background: #4f46e5; }

.error-page { text-align: center; padding: 40px 20px; }
.error-page .code { font-size: 56px; color: var(--color-error); font-weight: 700; }
.error-page .msg { font-size: 15px; color: var(--text-secondary); margin-top: 10px; }

.recharge-box {
    padding: 16px;
    background: var(--color-success-bg);
    border-radius: var(--radius-sm);
    color: var(--color-success);
    font-size: 13px;
}

/* ========================================================
   安装页 (install.php) — 玻璃拟态
   ======================================================== */
.install-bg {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #000;
    color: rgba(255, 255, 255, 0.95);
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.install-card {
    width: 420px;
    max-width: 92%;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 32px;
    position: relative;
    z-index: 10;
}
.install-card header { text-align: center; margin-bottom: 24px; }
.install-card .logo { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 6px; }
.install-card h1 { font-size: 17px; font-weight: 600; text-align: center; margin-bottom: 4px; letter-spacing: 0.5px; }
.install-card .subtitle { font-size: 12px; color: rgba(255, 255, 255, 0.5); text-align: center; margin-bottom: 20px; }

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}
.step-indicator .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.step-indicator .dot.active { background: #fff; transform: scale(1.6); box-shadow: 0 0 8px rgba(255, 255, 255, 0.4); }
.step-indicator .dot.done { background: rgba(255, 255, 255, 0.6); }

.env-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
}
.env-item:hover { background: rgba(255, 255, 255, 0.04); }
.env-name { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.8); }
.env-status { font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.status-ok { color: #34d399; }
.status-no { color: #f87171; }
.status-warn { color: #fbbf24; }

.install-card .form-group { margin-bottom: 12px; position: relative; }
.install-card .input-row { display: flex; gap: 10px; }
.install-card input {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.25s ease;
    font-family: inherit;
}
.install-card input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}
.install-card input::placeholder { color: rgba(255, 255, 255, 0.25); font-size: 13px; }
.install-card .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: color 0.3s;
    font-size: 14px;
}
.install-card .toggle-password:hover { color: rgba(255, 255, 255, 0.8); }
.install-card .has-eye { padding-right: 40px; }

.install-card .btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 13px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    margin-top: 16px;
    font-family: inherit;
}
.install-card .btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.install-card .btn:active { transform: translateY(1px); }
.install-card .btn:disabled {
    background: rgba(255, 255, 255, 0.03);
    border-color: transparent;
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.install-card .alert {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.15);
    color: rgba(248, 113, 113, 0.9);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    text-align: center;
    margin-bottom: 16px;
}

.install-card .success-icon {
    width: 52px; height: 52px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
    color: #34d399;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin: 0 auto 14px;
}
.install-card .credential-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px;
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}
.install-card .credential-box i { width: 16px; text-align: center; margin-right: 6px; opacity: 0.7; }
.install-card .credential-box code {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: monospace;
    letter-spacing: 0.5px;
}

/* ========================================================
   登录页 (gork.php / login.php) — ay 风格
   ======================================================== */
.ay-bg {
    margin: 0;
    color: #f3f6ff;
    font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", system-ui, Arial;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-x: hidden;
    min-height: 100vh;
}
.ay-dim {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.3);
}
.ay-petals {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.ay-petals i {
    position: absolute;
    width: 12px;
    height: 10px;
    background: linear-gradient(135deg, #ffd1e6, #ff9aca);
    border-radius: 80% 80% 80% 20% / 80% 80% 20% 80%;
    opacity: 0.5;
    filter: blur(0.2px);
    animation: ay-fall linear infinite;
    transform: rotate(20deg);
}
.ay-petals i:nth-child(3n) { width: 9px; height: 7px; animation-duration: 12s; }
.ay-petals i:nth-child(4n) { animation-duration: 10s; opacity: 0.35; }
.ay-petals i:nth-child(5n) { width: 14px; height: 12px; animation-duration: 14s; }
@keyframes ay-fall { to { transform: translateY(110vh) rotate(360deg); } }

.ay-wrap {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(16px, 4vw, 32px);
    perspective: 1000px;
}
.ay-card {
    width: min(480px, 92vw);
    margin-top: 14px;
    background: rgba(12, 14, 28, 0.55);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    box-shadow: 0 18px 60px rgba(5, 9, 20, 0.45);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: box-shadow 0.25s ease;
}
.ay-card:hover { box-shadow: 0 24px 80px rgba(5, 9, 20, 0.55); }
.ay-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from 200deg, #ff7dc6, #7aa8ff, #ff7dc6);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.7;
    pointer-events: none;
}

.ay-head { padding: 24px 22px 8px; display: grid; place-items: center; row-gap: 8px; }
.ay-logo {
    width: 60px; height: 60px; border-radius: 50%;
    box-shadow: 0 8px 26px rgba(255, 154, 202, 0.25);
    background: linear-gradient(135deg, #ffb6f0, #9ad6ff);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 24px; font-weight: 700;
}
.ay-title {
    margin: 4px 0 0;
    font-weight: 700;
    letter-spacing: 0.6px;
    font-size: clamp(18px, 2.6vw, 22px);
    color: white;
}
.ay-sub {
    margin: 0 0 6px;
    color: #b9c3e6;
    font-size: 12px;
    text-align: center;
}
.ay-body { padding: 12px 22px 22px; }

.ay-field { position: relative; margin: 16px 0 20px; }
.ay-input {
    width: 100%;
    height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #f3f6ff;
    outline: none;
    transition: all 0.18s ease;
    font-family: inherit;
    font-size: 14px;
}
.ay-input::placeholder { color: transparent; }
.ay-input:focus {
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow: 0 0 0 3px rgba(255, 125, 198, 0.18);
    background: rgba(255, 255, 255, 0.08);
}
.ay-label {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-52%);
    font-size: 14px;
    color: #b9c3e6;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 0 4px;
    direction: rtl;
    text-align: right;
}
.ay-input:focus + .ay-label,
.ay-input:not(:placeholder-shown) + .ay-label {
    top: 0;
    right: 14px;
    left: auto;
    font-size: 12px;
    background: rgba(10, 12, 24, 0.95);
    padding: 0 8px;
    border-radius: 999px;
    color: #e9eaff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: translateY(0);
    direction: rtl;
    text-align: right;
}
.ay-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s;
}
.ay-eye:hover { background: rgba(255, 255, 255, 0.1); }
.ay-eye svg { transition: stroke 0.3s ease; }

.ay-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 10px;
    background: linear-gradient(135deg, #ffb6f0, #9ad6ff);
    box-shadow: 0 12px 30px rgba(122, 168, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
    transition: transform 0.1s ease, box-shadow 0.2s ease, filter 0.2s;
    font-family: inherit;
    font-size: 15px;
}
.ay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(122, 168, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.ay-btn:active { transform: translateY(1px) scale(0.98); filter: brightness(0.95); }

.ay-foot {
    margin: 12px 0 8px;
    text-align: center;
    color: #dfe6ff;
    font-size: 12px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.ay-foot:hover { opacity: 1; }

.ay-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ay-msg {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    font-size: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ay-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #b9c3e6;
    font-size: 12px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.2s;
}
.ay-back-link:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }

/* 锁定状态提示 */
.lock-alert {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 480px) {
    .ay-body { padding: 10px 16px 18px; }
    .ay-card { transform: none !important; }
    .amount-grid { grid-template-columns: repeat(2, 1fr); }
    .pay-footer { flex-wrap: wrap; gap: 10px; }
    .pay-footer .total { font-size: 20px; }
    .install-card { padding: 24px 18px; border-radius: 24px; }
    .install-card .input-row { flex-direction: column; gap: 12px; }
}
@media (max-width: 640px) {
    .result-container { padding: 28px 20px; }
}


/* ========================================================
   Admin Dashboard (merged from cards.css)
======================================================== */
/* ----------------------------------------------------
   整体布局框架 & 侧边栏折叠
---------------------------------------------------- */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sider {
    width: var(--sidebar-width);
    background-color: var(--bg-container);
    position: fixed; top: 0; bottom: 0; left: 0;
    z-index: 50;
    display: flex; flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
    border-right: 1px solid var(--border-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sider-logo {
    height: var(--header-height);
    display: flex; align-items: center; justify-content: flex-start;
    padding: 0 24px; gap: 12px;
    border-bottom: 1px solid var(--border-color);
    transition: padding 0.3s;
    flex-shrink: 0;
}
.sider-logo img {
    width: 30px; height: 30px; min-width: 30px;
    border-radius: 8px; object-fit: cover;
}
.logo-text {
    font-size: 16px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px;
    white-space: nowrap; opacity: 1; transition: opacity 0.2s, width 0.3s; overflow: hidden;
}

.sider-menu { 
    flex: 1; 
    overflow-y: auto; 
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.sider-menu::-webkit-scrollbar { width: 8px; }
.sider-menu::-webkit-scrollbar-track { background: transparent; }
.sider-menu::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.sider-menu::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.sider-footer {
    flex-shrink: 0;
    padding: 8px 0 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-container);
}

.menu-group {
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-tertiary); margin: 20px 24px 8px; white-space: nowrap; overflow: hidden;
    transition: opacity 0.2s;
}

.menu-item {
    display: flex; align-items: center; justify-content: flex-start;
    padding: 10px 16px; margin: 4px 16px;
    border-radius: var(--radius-base);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer; position: relative;
    font-weight: 500;
}
.menu-item i { min-width: 22px; font-size: 20px; text-align: center; }
.menu-item span {
    margin-left: 12px; white-space: nowrap; opacity: 1;
    transition: opacity 0.2s, transform 0.2s;
}
.menu-item:hover { background-color: var(--bg-hover); color: var(--text-primary); transform: translateX(2px); }
.menu-item.active {
    background-color: var(--color-primary); color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.menu-item.active i { color: #fff; }
.menu-item-danger { color: var(--color-error); }
.menu-item-danger:hover { background-color: var(--color-error-bg); color: var(--color-error); }

/* => 整体侧边栏缩小状态 <= */
.admin-layout.sider-collapsed .admin-sider { width: var(--sidebar-collapsed-width); }
.admin-layout.sider-collapsed .admin-main { margin-left: var(--sidebar-collapsed-width); }
.admin-layout.sider-collapsed .sider-logo { padding: 0; justify-content: center; }
.admin-layout.sider-collapsed .logo-text,
.admin-layout.sider-collapsed .menu-group { opacity: 0; width: 0; height: 0; margin: 0; }
.admin-layout.sider-collapsed .sider-logo .logo-info { display: none; }
.admin-layout.sider-collapsed .menu-item { padding: 12px 0; justify-content: center; }
.admin-layout.sider-collapsed .menu-item:hover { transform: none; }
.admin-layout.sider-collapsed .menu-item span { opacity: 0; width: 0; margin-left: 0; display: none; }
.admin-layout.sider-collapsed .sider-footer { border-top: none; padding: 4px 0 8px; }

/* 右侧主区域 */
.admin-main {
    flex: 1; margin-left: var(--sidebar-width);
    display: flex; flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    position: sticky; top: 0; z-index: 100;
}
.sider-toggle {
    background: transparent; border: none; font-size: 24px; color: var(--text-secondary);
    cursor: pointer; padding: 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.sider-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }

.header-user { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); font-weight: 500; }
.header-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); }

.admin-content { padding: 28px 32px; flex: 1; }

/* ----------------------------------------------------
   无刷新切换动效 (SPA 主体转场)
---------------------------------------------------- */
.transition-wrapper {
    /* 容器保留基准 */
}
.page-exit {
    opacity: 0.5;
    transform: scale(0.99);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.page-enter {
    opacity: 0;
    transform: translateY(15px);
}
.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----------------------------------------------------
   通用组件与排版优化
---------------------------------------------------- */
.page-title { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 0 0 6px 0; letter-spacing: -0.5px; }
.page-desc { font-size: 14px; color: var(--text-tertiary); margin: 0 0 28px 0; }

/* 面板卡片 */
.e-card {
    background: var(--bg-container);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 20px; border: 1px solid var(--border-color);
}
.e-card-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border-color);
    font-size: 16px; font-weight: 600; color: var(--text-primary);
    display: flex; justify-content: space-between; align-items: center;
}
.e-card-body { padding: 24px; }

/* 表单元素 */
.e-form-item { margin-bottom: 24px; }
.e-form-grid { display: grid; gap: 12px 16px; align-items: end; }
.e-form-grid .e-form-item { margin-bottom: 0; }
.e-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--text-primary); }
.e-input, .e-select, .e-textarea {
    width: 100%; box-sizing: border-box;
    padding: 8px 12px; font-size: 14px; line-height: 1.5; font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-primary); background-color: var(--bg-layout);
    border: 1px solid var(--border-color-input); border-radius: var(--radius-base);
    transition: all 0.2s ease;
}
.e-input:hover, .e-select:hover, .e-textarea:hover { border-color: #cbd5e1; }
.e-input:focus, .e-select:focus, .e-textarea:focus {
    background-color: #fff; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); outline: none;
}
.e-textarea { resize: vertical; min-height: 90px; }

/* 按钮 */
.e-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 500; white-space: nowrap; cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none; touch-action: manipulation;
    height: 34px; padding: 0 16px; font-size: 14px;
    border-radius: var(--radius-base); border: 1px solid transparent;
}
.e-btn:active { transform: scale(0.96); }
.e-btn-primary { color: #fff; background-color: var(--color-primary); box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3); }
.e-btn-primary:hover { background-color: var(--color-primary-hover); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }
.e-btn-default { color: var(--text-primary); background-color: #fff; border-color: var(--border-color-input); box-shadow: var(--shadow-sm); }
.e-btn-default:hover { color: var(--color-primary); border-color: #93c5fd; background-color: var(--color-primary-bg); }
.e-btn-danger { color: var(--color-error); background-color: #fff; border-color: var(--color-error-border); box-shadow: var(--shadow-sm); }
.e-btn-danger:hover { background-color: var(--color-error); color: #fff; border-color: var(--color-error); }
.e-btn-link { color: var(--color-primary); background: transparent; border-color: transparent; padding: 0 6px; height: auto; font-weight:500; }
.e-btn-link:hover { color: var(--color-primary-hover); background: transparent; text-decoration: underline; text-underline-offset: 4px; }

/* 按钮尺寸变体 */
.e-btn-sm { height: 30px; padding: 0 12px; font-size: 12px; text-decoration: none; }
.e-btn-sm-icon { font-size: 13px; }

/* 状态消息框 */
.e-alert { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 13px; border: 1px solid transparent; }
.e-alert-success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.2); color: #16a34a; }
.e-alert-error { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); color: #dc2626; }
.e-alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.2); color: #d97706; }
.e-alert-info { background: var(--color-primary-bg); border-color: rgba(59,130,246,0.2); color: var(--color-primary); }
.e-alert i { font-size: 16px; }

/* 统计卡片图标语义化颜色 */
.stat-icon-primary { background: var(--color-primary-bg); color: var(--color-primary); }
.stat-icon-success { background: var(--color-success-bg); color: var(--color-success); }
.stat-icon-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.stat-icon-error { background: var(--color-error-bg); color: var(--color-error); }
.stat-icon-purple { background: #f3e8ff; color: #a855f7; }
.stat-icon-blue { background: #dbeafe; color: #2563eb; }
.stat-icon-amber { background: #fef3c7; color: #d97706; }

/* 表格单元格工具类 */
.td-mono { font-family: var(--mono-font); font-size: 12px; }
.td-muted { font-size: 12px; color: var(--text-tertiary); }
.td-secondary { font-size: 12px; color: var(--text-secondary); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-success { color: var(--color-success); }
.td-error { color: var(--color-error); }

/* 资金收支颜色 */
.text-income { color: var(--color-success); }
.text-expense { color: var(--color-error); }


/* 表格 */
.e-table-wrap { overflow-x: auto; }
.e-table { width: 100%; text-align: left; border-collapse: separate; border-spacing: 0; }
.e-table th {
    background: #f8fafc; color: var(--text-secondary); font-weight: 600; text-transform: uppercase;
    font-size: 12px; letter-spacing: 0.5px; padding: 14px 20px; border-bottom: 1px solid var(--border-color-input);
    white-space: nowrap;
}
.e-table td {
    padding: 14px 20px; border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary); transition: background 0.2s; font-size: 13.5px;
}
.e-table tr:hover td { background: var(--bg-hover); }

/* 标签 Tag */
.e-tag {
    box-sizing: border-box; display: inline-flex; align-items: center;
    font-size: 12px; font-weight: 500; line-height: 20px; padding: 2px 8px; border-radius: 6px;
    border: 1px solid var(--border-color-input); background: #f8fafc; color: var(--text-secondary); white-space: nowrap;
}
.e-tag-blue { color: var(--color-primary); background: var(--color-primary-bg); border-color: #bfdbfe; }
.e-tag-green { color: var(--color-success); background: var(--color-success-bg); border-color: var(--color-success-border); }
.e-tag-red { color: var(--color-error); background: var(--color-error-bg); border-color: var(--color-error-border); }
.e-tag-warning { color: var(--color-warning); background: var(--color-warning-bg); border-color: var(--color-warning-border); }

/* Segmented Control */
.e-segmented {
    display: inline-flex; background-color: var(--bg-active);
    border-radius: 10px; padding: 3px; gap: 2px;
}
.e-segmented-item {
    padding: 6px 20px; font-size: 14px; font-weight: 500; cursor: pointer; border-radius: 8px;
    color: var(--text-secondary); transition: all 0.2s ease;
}
.e-segmented-item:hover { color: var(--text-primary); }
.e-segmented-item.active { background-color: #fff; color: var(--text-primary); box-shadow: var(--shadow-sm); }

/* Dashboard 卡片 */
.stat-box {
    display: flex; align-items: center; gap: 20px;
    padding: 24px; background: var(--bg-container);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-box:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon {
    width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.stat-info { display: flex; flex-direction: column; }
.stat-title { font-size: 14px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; letter-spacing: -0.5px;}

/* Modal 与 Toast */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-content {
    background: #fff; border-radius: 16px; width: 100%; max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); border: 1px solid rgba(0,0,0,0.05);
}
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); font-size: 18px; font-weight: 600; }
.modal-body { padding: 24px; }
@keyframes modalIn { 0% { transform: scale(0.95) translateY(10px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }

/* 布局工具类 */
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.mr-2 { margin-right: 8px; } .ml-2 { margin-left: 8px; }
.pt-2 { padding-top: 8px; } .pt-4 { padding-top: 16px; } .pt-6 { padding-top: 24px; } .pb-4 { padding-bottom: 16px; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 4px; } .gap-5 { gap: 20px; }
.grid { display: grid; } .grid-cols-4 { grid-template-columns: repeat(4, 1fr); } .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.fs-11 { font-size: 11px; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; } .fs-14 { font-size: 14px; } .fs-16 { font-size: 16px; } .fs-18 { font-size: 18px; }
@media (min-width: 769px) { .md\:flex { display: flex !important; } .md\:col-span-2 { grid-column: span 2 / span 2; } }
@media (max-width: 1024px) { .grid-cols-4 { grid-template-columns: repeat(2, 1fr); } }

/* ----------------------------------------------------
   多级折叠菜单 (Accordion Sub-menu)
---------------------------------------------------- */
.has-submenu { justify-content: space-between; }
.has-submenu span { flex: 1; }
.sub-arrow {
    font-size: 14px !important; min-width: auto !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); color: var(--text-tertiary);
}
.submenu-open .sub-arrow { transform: rotate(180deg); }
.active-parent i:first-child, .active-parent span { color: var(--color-primary); font-weight: 600; }

.sub-menu {
    overflow: hidden;
    margin-left: 34px;
    width: calc(100% - 34px);
    padding-left: 14px;
    border-left: 1px solid var(--border-color-input);
    margin-bottom: 8px;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}
.sub-menu.sub-menu-open { max-height: 2000px; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.sub-menu-item {
    display: block; padding: 8px 12px; margin: 4px 0;
    color: var(--text-secondary); font-size: 13.5px; border-radius: var(--radius-base);
    transition: all 0.2s ease; position: relative;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sub-menu-item:hover { color: var(--color-primary); background-color: var(--bg-hover); }
.sub-menu-item.active { color: var(--color-primary); font-weight: 600; background-color: var(--color-primary-bg); }

.admin-layout.sider-collapsed .sub-arrow { display: none; }
.admin-layout.sider-collapsed .sub-menu { max-height: 0 !important; overflow: hidden !important; }
.admin-layout.sider-collapsed .submenu-open.active-parent { background-color: var(--color-primary-bg); }


/* ====================================================
   移动端深度适配 (Mobile First Restyling)
==================================================== */
.m-nav { display: none; }
.m-more-mask { display: none; }
.m-more-panel { display: none; }

@media (max-width: 768px) {
    /* 隐藏 PC 侧边栏和头部 */
    .admin-sider { display: none; }
    .admin-header { display: none !important; }
    .admin-main { margin-left: 0; }
    
    /* 缩小全局外边距，底部为导航栏留空 */
    body { padding-bottom: 90px !important; }
    .admin-content { padding: 12px; padding-bottom: 80px; }
    
    .page-title { font-size: 20px; }
    .page-desc { margin-bottom: 16px; font-size: 13px; }

    /* 移动端底部浮起胶囊导航栏 */
    .m-nav {
        display: flex; position: fixed; bottom: 16px; left: 16px; right: 16px;
        width: auto; border-radius: 24px; border-top: none;
        border: 1px solid rgba(100, 100, 100, 0.1);
        background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        padding: 4px 8px; z-index: 100;
        box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    }
    .m-nav-item {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
        padding: 8px 0 6px 0; color: var(--text-tertiary); cursor: pointer; transition: color 0.2s;
    }
    .m-nav-item i { font-size: 22px; margin-bottom: 2px; }
    .m-nav-item span { font-size: 11px; font-weight: 500; }
    .m-nav-item.active { color: var(--color-primary); }

    /* 卡片间距与圆角紧凑化 */
    .e-card { margin-bottom: 12px; border-radius: 12px; }
    .e-card-header { padding: 14px 16px; font-size: 15px; }
    .e-card-body { padding: 16px; }

    /* 全局表单元素占满宽度 */
    .e-input, .e-select { max-width: 100% !important; height: 38px; }
    
    /* 搜索栏与查询表单转为上下堆叠 */
    form.flex.gap-3.items-center.flex-1, 
    .e-card form.flex {
        flex-direction: column; width: 100%; align-items: stretch; gap: 12px;
    }
    form.flex button[type="submit"] { width: 100%; height: 38px; }

    /* 修复表单内部的多列网格 (如制卡页) */
    .grid-cols-2, .grid-cols-4 { grid-template-columns: 1fr !important; gap: 12px !important; }

    /* =======================================
       核心交互优化：横向滚动防换行挤压
    ======================================= */
    /* 批量操作按钮区域横向原生滚动 */
    #batchForm .flex-wrap {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding: 12px 16px !important;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
    }
    #batchForm .flex-wrap::-webkit-scrollbar { display: none; }
    #batchForm .e-btn { padding: 0 12px; font-size: 13px; height: 32px; flex-shrink: 0; }
    #batchForm span[style*="flex:1"] { display: none; /* 隐藏占位符以确保紧凑排列 */ }
    
    /* 分段选择器 (Tabs) 横向原生滚动 */
    .e-segmented { 
        width: 100%; overflow-x: auto; flex-wrap: nowrap; 
        justify-content: flex-start; -webkit-overflow-scrolling: touch; 
    }
    .e-segmented::-webkit-scrollbar { display: none; }
    .e-segmented-item { flex-shrink: 0; white-space: nowrap; }

    /* =======================================
       数据表格紧凑化与边界释放
    ======================================= */
    /* 让表格突破父卡片的 padding 限制，达到视觉最大化 */
    .e-table-wrap { 
        border: none; border-radius: 0; 
        margin: 0 -16px; width: calc(100% + 32px); 
        -webkit-overflow-scrolling: touch;
    }
    .e-table th, .e-table td { padding: 10px 12px; font-size: 12.5px; }
    /* 恢复两端内边距，避免文字贴屏幕边缘 */
    .e-table th:first-child, .e-table td:first-child { padding-left: 16px; }
    .e-table th:last-child, .e-table td:last-child { padding-right: 16px; }

    /* =======================================
       组件与微调
    ======================================= */
    /* 弹窗 (Modal) 自适应屏幕宽 */
    .modal-content { width: 90%; max-width: none; border-radius: 12px; margin: 0 20px; }
    .modal-header { padding: 16px; font-size: 16px; }
    .modal-body { padding: 16px; }

    /* 概览数据卡片缩小 */
    .stat-box { padding: 16px; gap: 12px; }
    .stat-icon { width: 44px; height: 44px; font-size: 24px; border-radius: 12px; }
    .stat-title { font-size: 13px; }
    .stat-value { font-size: 22px; }
    
    /* 修复弹层通知靠顶太近 */
    .toast-container { top: 16px; }

    /* 移动端"更多"面板 */
    .m-more-mask {
        display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
        backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
        z-index: 150; opacity: 0; pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .m-more-mask.show { opacity: 1; pointer-events: auto; }
    .m-more-panel {
        display: block; position: fixed; left: 0; right: 0; bottom: 0;
        background: #fff; border-radius: 24px 24px 0 0;
        z-index: 151; padding: 16px 20px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
    }
    .m-more-panel.show { transform: translateY(0); }
    .m-more-header {
        display: flex; justify-content: space-between; align-items: center;
        padding-bottom: 12px; margin-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }
    .m-more-header span { font-size: 16px; font-weight: 700; color: var(--text-primary); }
    .m-more-close {
        width: 32px; height: 32px; border-radius: 8px; border: none;
        background: var(--bg-layout); color: var(--text-secondary);
        display: flex; align-items: center; justify-content: center;
        cursor: pointer; font-size: 18px;
    }
    .m-more-grid {
        display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    }
    .m-more-item {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        padding: 14px 6px; border-radius: 12px; color: var(--text-secondary);
        text-decoration: none; font-size: 12px; font-weight: 500;
        transition: all 0.2s ease;
    }
    .m-more-item i { font-size: 22px; margin-bottom: 4px; }
    .m-more-item:hover { background: var(--bg-hover); color: var(--text-primary); }
    .m-more-item.active { background: var(--color-primary-bg); color: var(--color-primary); }
    .m-more-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: center; }
}

/* ========================================================
   代理商后台布局 (agent.php)
======================================================== */
.agent-layout { display: flex; min-height: 100vh; }
.agent-sider { width: 230px; background: var(--bg-container); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; flex-shrink: 0; height: 100vh; position: sticky; top: 0; }
.agent-sider-logo { padding: 20px 16px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.agent-sider-logo img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.agent-sider-logo .logo-text { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.agent-sider-logo .logo-sub { font-size: 11px; color: var(--color-primary); font-weight: 600; margin-top: 2px; }
.agent-menu { padding: 12px 8px 20px; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.agent-menu::-webkit-scrollbar { width: 8px; }
.agent-menu::-webkit-scrollbar-track { background: transparent; }
.agent-menu::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.agent-menu::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.agent-menu-group { padding: 12px 12px 6px; font-size: 11px; color: var(--text-tertiary); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.agent-menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text-secondary); font-size: 13px; font-weight: 500; text-decoration: none; margin-bottom: 2px; transition: all 0.15s; }
.agent-menu-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.agent-menu-item.active { background: var(--color-primary-bg); color: var(--color-primary); font-weight: 600; }
.agent-menu-item i { font-size: 17px; }
.agent-menu-item-danger { color: var(--color-error) !important; }
.agent-menu-item-danger:hover { background: var(--color-error-bg) !important; }
.agent-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.agent-header { padding: 14px 24px; border-bottom: 1px solid var(--border-color); background: var(--bg-container); display: flex; align-items: center; justify-content: space-between; }
.agent-header-right { display: flex; align-items: center; gap: 16px; }
.agent-user { display: flex; align-items: center; gap: 10px; }
.agent-user-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.agent-user-balance { font-size: 12px; padding: 4px 10px; background: var(--color-primary-bg); color: var(--color-primary); border-radius: 999px; font-weight: 600; }
.agent-header-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color); }
.agent-content { padding: 24px; flex: 1; overflow-y: auto; }
.agent-balance { color: var(--color-primary); font-weight: 700; font-size: 15px; }

/* 统计卡片 (Dashboard / 代理商首页通用) */
.pro-stat-card { position: relative; background: var(--bg-container); border: 1px solid var(--border-color); border-radius: 20px; padding: 24px; overflow: hidden; display: flex; flex-direction: column; gap: 16px; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pro-stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px -8px rgba(0,0,0,0.08); border-color: transparent; }
.pro-stat-header { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.pro-stat-icon-wrap { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.pro-stat-value { font-size: 36px; font-weight: 700; color: var(--text-primary); line-height: 1; font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; letter-spacing: -1px; }
.pro-stat-watermark { position: absolute; right: -15px; bottom: -15px; font-size: 100px; opacity: 0.04; transform: rotate(-15deg); pointer-events: none; }

/* 表情动画（Dashboard 欢迎语） */
@keyframes wave { 0% {transform: rotate(0deg);} 10% {transform: rotate(14deg);} 20% {transform: rotate(-8deg);} 30% {transform: rotate(14deg);} 40% {transform: rotate(-4deg);} 50% {transform: rotate(10deg);} 60% {transform: rotate(0deg);} 100% {transform: rotate(0deg);} }
.wave-emoji { display: inline-block; transform-origin: 70% 70%; animation: wave 2.5s infinite; }

/* 加载动画 */
@keyframes spin { 100% { transform: rotate(360deg); } }

/* 通知滚动条美化 */
.notice-scroll::-webkit-scrollbar { width: 6px; }
.notice-scroll::-webkit-scrollbar-track { background: transparent; }
.notice-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 3px; }
.notice-scroll::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* 代理商制卡页 - 成本价预览 */
.type-hint-tag { background: rgba(245,158,11,0.1); color: #f59e0b; border: 1px solid rgba(245,158,11,0.2); padding: 10px 14px; border-radius: 12px; font-size: 13px; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.cost-price-display { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; padding-left: 4px; }
.price-summary { display: flex; flex-direction: column; gap: 10px; border: 1px dashed var(--border-color-input); border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; background: var(--bg-hover); }
.price-summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-secondary); }
.price-summary-row .ps-val { font-weight: 700; color: var(--text-primary); font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; }
.price-summary-row .ps-missing { color: var(--color-error); }
.price-summary-total { border-top: 1px solid var(--border-color); padding-top: 10px; font-weight: 600; color: var(--text-primary); }
.price-summary-total .ps-val { color: var(--color-primary); font-size: 16px; }
.price-summary-total .ps-total-over { color: var(--color-error); }
.ps-balance { font-size: 12px; }
.ps-balance-ok { color: var(--color-success); }
.ps-balance-error { color: var(--color-error); }

/* 等宽字体工具类 */
.mono { font-family: 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', monospace; }

/* 滑块样式 */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: var(--border-color-input); border-radius: 3px; outline: none; transition: background 0.2s; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--color-primary); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.2); transition: transform 0.1s; }
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.2); }

/* 代理商 - 移动端底部导航 */
.agent-m-nav { display: none; }
@media (max-width: 900px) {
    .agent-sider { display: none; height: auto; position: static; }
    .agent-main { margin-left: 0; }
    .agent-content { padding: 12px; padding-bottom: 80px; }
    .page-title { font-size: 18px; }
    .page-desc { margin-bottom: 16px; font-size: 12px; }

    .agent-m-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-color);
        padding-bottom: env(safe-area-inset-bottom); z-index: 100;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
    }
    .agent-m-nav-item {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
        padding: 7px 0 5px 0; color: var(--text-tertiary); cursor: pointer; transition: color 0.2s;
        text-decoration: none; min-width: 0;
    }
    .agent-m-nav-item i { font-size: 20px; margin-bottom: 2px; }
    .agent-m-nav-item span { font-size: 10px; font-weight: 500; white-space: nowrap; }
    .agent-m-nav-item.active { color: var(--color-primary); }

    .agent-header { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
    .agent-header-right { gap: 6px; flex-wrap: wrap; }
    .agent-user-balance { font-size: 11px; padding: 3px 8px; }
    .agent-header-right .e-btn { font-size: 11px; padding: 0 8px; height: 26px; }
    .agent-user-name { display: none; }

    .pro-stat-card { padding: 14px; gap: 10px; }
    .pro-stat-value { font-size: 22px; }

    .e-table-wrap { -webkit-overflow-scrolling: touch; }
    .e-table th, .e-table td { padding: 8px 10px; font-size: 12px; }
}

/* ========================================================
   API 文档页面样式
======================================================== */
.api-docs { max-width: 1100px; }
.api-docs .mb-6 { margin-bottom: 24px; }

.api-hero {
    display: flex; align-items: center; gap: 20px;
    padding: 28px 32px;
}
.api-hero-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}
.api-hero-info { flex: 1; min-width: 0; }
.api-hero-info h2 {
    margin: 0 0 6px 0; font-size: 22px; font-weight: 700;
    color: var(--text-primary);
}
.api-hero-info p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.api-url {
    background: var(--bg-layout); padding: 4px 10px; border-radius: 6px;
    font-size: 12px; color: var(--color-primary); font-family: 'JetBrains Mono', monospace;
    word-break: break-all;
}
.api-hero-tokens { flex-shrink: 0; }
.api-token-box {
    background: var(--bg-layout); border-radius: 12px; padding: 12px 16px;
    border: 1px solid var(--border-color); min-width: 280px;
}
.api-token-label {
    display: block; font-size: 11px; font-weight: 600;
    color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.api-token-value { display: flex; align-items: center; gap: 8px; }
.api-token-value code {
    font-family: 'JetBrains Mono', monospace; font-size: 13px;
    color: var(--text-primary); font-weight: 500;
    background: rgba(59, 130, 246, 0.1); padding: 4px 8px; border-radius: 6px;
    flex: 1; min-width: 0; word-break: break-all;
}
.api-copy-btn {
    background: var(--bg-layout); border: 1px solid var(--border-color);
    border-radius: 6px; width: 28px; height: 28px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-tertiary); font-size: 12px; transition: all 0.2s;
}
.api-copy-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.api-toc {
    background: var(--bg-layout); border-radius: 16px; padding: 20px 24px;
    margin-bottom: 28px;
}
.api-toc-title {
    font-size: 13px; font-weight: 600; color: var(--text-tertiary);
    margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px;
}
.api-toc-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.api-toc-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: #fff; border-radius: 10px;
    border: 1px solid var(--border-color);
    text-decoration: none; color: var(--text-primary);
    font-size: 13px; font-weight: 500; transition: all 0.2s;
}
.api-toc-item:hover {
    border-color: var(--color-primary); color: var(--color-primary);
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}
.api-toc-item i { font-size: 16px; color: var(--color-primary); }

.api-section { margin-bottom: 32px; }
.api-section-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 18px; font-weight: 700; color: var(--text-primary);
    margin: 0 0 16px 0; padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}
.api-section-title i { color: var(--color-primary); font-size: 22px; }

.api-table th { font-weight: 600; font-size: 12px; }
.api-table td code {
    background: var(--bg-layout); padding: 2px 6px; border-radius: 4px;
    font-family: 'JetBrains Mono', monospace; font-size: 12px;
    color: var(--color-primary); font-weight: 500;
}
.api-type-cell {
    background: var(--bg-layout); font-weight: 600; text-align: center;
    font-size: 13px;
}
.api-badge {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
}
.api-badge-client { background: #dbeafe; color: #2563eb; }
.api-badge-admin { background: #fef3c7; color: #d97706; }
.api-badge-pay { background: #dcfce7; color: #16a34a; }
.api-badge-agent { background: #fce7f3; color: #db2777; }
.api-badge-data { background: #ede9fe; color: #7c3aed; }

/* 通用 Badge 样式 */
.e-badge {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
    line-height: 1.4;
}
.e-badge-success { background: var(--color-success-bg); color: var(--color-success); }
.e-badge-disabled { background: var(--color-disabled-bg, #f1f5f9); color: var(--text-tertiary); }
.e-badge-warning { background: var(--color-warning-bg, #fef3c7); color: var(--color-warning, #d97706); }
.e-badge-error { background: var(--color-error-bg, #fee2e2); color: var(--color-error, #dc2626); }
.e-badge-primary { background: var(--color-primary-bg); color: var(--color-primary); }

/* 支付状态 Badge */
.e-badge-pending { background: #fff7ed; color: #c2410c; }
.e-badge-paid { background: #dbeafe; color: #1d4ed8; }
.e-badge-delivered { background: #d1fae5; color: #047857; }
.e-badge-closed { background: #e5e7eb; color: #6b7280; }
.e-badge-failed { background: #fee2e2; color: #b91c1c; }

/* 业务类型 Badge */
.e-badge-blue { background: #eef2ff; color: #4338ca; }
.e-badge-green { background: #ecfdf5; color: #047857; }

.api-subsection { margin-bottom: 20px; }
.api-subtitle {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    margin: 0 0 12px 0;
}
.api-desc {
    font-size: 13px; color: var(--text-secondary); line-height: 1.7;
    margin: 0 0 12px 0;
}
.api-desc code {
    background: var(--bg-layout); padding: 2px 6px; border-radius: 4px;
    font-family: 'JetBrains Mono', monospace; font-size: 12px;
    color: var(--color-primary);
}
.api-steps { margin: 12px 0; }
.api-step {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0; font-size: 13px; color: var(--text-secondary);
}
.api-step-num {
    flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
    background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}
.api-step code {
    background: var(--bg-layout); padding: 1px 5px; border-radius: 4px;
    font-family: 'JetBrains Mono', monospace; font-size: 11px;
    color: var(--color-primary);
}

.api-endpoint {
    background: #fff; border: 1px solid var(--border-color); border-radius: 12px;
    margin-bottom: 16px; overflow: hidden;
}
.api-endpoint-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; background: var(--bg-layout);
    border-bottom: 1px solid var(--border-color);
}
.api-endpoint-body { padding: 20px; }
.api-method {
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.api-method-post { background: #dcfce7; color: #16a34a; }
.api-method-get { background: #dbeafe; color: #2563eb; }
.api-endpoint-action {
    font-family: 'JetBrains Mono', monospace; font-size: 13px;
    font-weight: 600; color: var(--text-primary);
}
.api-endpoint-desc {
    font-size: 13px; color: var(--text-secondary); margin-left: auto;
}

.api-code-block {
    background: #1e293b; border-radius: 10px; overflow: hidden;
    margin: 12px 0;
}
.api-code-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 14px; background: #334155;
}
.api-code-header span {
    font-size: 12px; font-weight: 600; color: #cbd5e1;
}
.api-code-header .api-copy-btn {
    width: 24px; height: 24px; background: #475569; border: none;
    color: #cbd5e1;
}
.api-code-header .api-copy-btn:hover { background: var(--color-primary); color: #fff; }
.api-code-content {
    margin: 0; padding: 16px; overflow-x: auto;
}
.api-code-content code {
    font-family: 'JetBrains Mono', monospace; font-size: 12px;
    color: #e2e8f0; line-height: 1.6;
    white-space: pre;
}
.api-code-content .language-php { color: #a5f3fc; }
.api-code-content .language-json { color: #86efac; }

.api-rate-info {
    display: flex; align-items: center; justify-content: center; gap: 0;
    padding: 20px 0;
}
.api-rate-item {
    text-align: center; flex: 1;
}
.api-rate-value {
    font-size: 28px; font-weight: 700; color: var(--color-primary);
    line-height: 1.2;
}
.api-rate-label {
    font-size: 12px; color: var(--text-tertiary);
    margin-top: 4px;
}
.api-rate-divider {
    width: 1px; height: 40px; background: var(--border-color);
    flex-shrink: 0;
}

.api-footer { margin-top: 32px; }
.api-footer-card {
    display: flex; gap: 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 16px; padding: 24px;
    border: 1px solid #fcd34d;
}
.api-footer-card > i {
    font-size: 28px; color: #d97706; flex-shrink: 0;
    margin-top: 2px;
}
.api-footer-card strong {
    display: block; font-size: 15px; font-weight: 700;
    color: #92400e; margin-bottom: 8px;
}
.api-footer-card p {
    font-size: 13px; color: #78350f; line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .api-hero { flex-direction: column; align-items: flex-start; padding: 20px; gap: 14px; }
    .api-hero-tokens { width: 100%; }
    .api-token-box { min-width: 0; width: 100%; }
    .api-toc-grid { grid-template-columns: repeat(2, 1fr); }
    .api-endpoint-header { flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
    .api-endpoint-desc { margin-left: 0; width: 100%; }
    .api-rate-info { flex-direction: column; gap: 16px; padding: 16px 0; }
    .api-rate-divider { width: 40px; height: 1px; }
    .api-footer-card { flex-direction: column; gap: 10px; }
    .api-section-title { font-size: 16px; }
}

@media (max-width: 640px) {
    .grid-cols-2, .grid-cols-4 { grid-template-columns: 1fr !important; gap: 12px !important; }
}
