/* ==========================================================================
   AI 中转站 - 简约风格样式（原生 CSS，无框架依赖）
   设计原则：单一强调色、中性灰阶、细边框、大量留白、无渐变无发光
   ========================================================================== */

:root {
    --accent:        #2563eb;
    --accent-hover:  #1d4ed8;
    --accent-soft:   #eef4ff;

    --text:          #111827;
    --text-2:        #4b5563;
    --text-3:        #9ca3af;

    --border:        #e5e7eb;
    --border-strong: #d1d5db;

    --bg:            #f7f8fa;
    --card:          #ffffff;
    --subtle:        #f3f4f6;

    --success:       #15803d;
    --success-soft:  #f0fdf4;
    --danger:        #b91c1c;
    --danger-soft:   #fef2f2;
    --warning:       #b45309;
    --warning-soft:  #fffbeb;

    --radius:    10px;
    --radius-sm: 8px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
            "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    /* 明确横排书写方向，杜绝任何环境下的竖排渲染 */
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    /* 长文本（订单号/密钥/URL）在窄屏下正常折行，避免逐字断行 */
    overflow-wrap: break-word;
    word-break: normal;
    /* 装饰元素不产生横向滚动（clip 不会破坏 position: sticky） */
    overflow-x: clip;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ---------------- 站点背景图（后台可配） ---------------- */
.site-bg {
    position: fixed; inset: 0; z-index: -1;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.site-bg::after {
    content: ""; position: absolute; inset: 0;
    background: rgba(255, 255, 255, var(--bg-veil, .85));
}
@media (max-width: 900px) {
    .site-bg { background-attachment: scroll; }   /* iOS 下 fixed 背景会抖动 */
}

/* ---------------- 动效（克制、统一时长） ---------------- */
:root {
    --ease: cubic-bezier(.22, .61, .36, 1);
    --dur: .28s;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slide-down {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}
@keyframes bar-grow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* 卡片与统计块入场（同屏只播一次，轻微错峰） */
.card, .stat, .feature, .auth-card, .section-title {
    animation: fade-up .38s var(--ease) both;
}
.grid-2 > *:nth-child(2), .grid-3 > *:nth-child(2), .grid-4 > *:nth-child(2) { animation-delay: .05s; }
.grid-2 > *:nth-child(3), .grid-3 > *:nth-child(3), .grid-4 > *:nth-child(3) { animation-delay: .1s; }
.grid-3 > *:nth-child(4), .grid-4 > *:nth-child(4) { animation-delay: .15s; }

/* 统计卡 / 功能卡：悬停轻微抬起 */
@media (hover: hover) {
    .stat, .feature { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
    .stat:hover, .feature:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(17, 24, 39, .07);
        border-color: var(--border-strong);
    }
}

/* 顶部导航下划线滑入 */
.nav-links a { position: relative; transition: color var(--dur) var(--ease); }
.nav-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
    background: var(--accent); border-radius: 2px;
    transform: scaleX(0); transform-origin: left center;
    transition: transform var(--dur) var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* 侧栏当前项左侧指示条 */
.sidebar a.item { position: relative; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.sidebar a.item::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--accent);
    transform: scaleY(0); transform-origin: center;
    transition: transform var(--dur) var(--ease);
}
.sidebar a.item.active::before { transform: scaleY(1); }

/* 按钮：轻抬 + 按下回弹 */
.btn { transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform .12s var(--ease), box-shadow var(--dur) var(--ease); }
.btn:not(:disabled):hover { box-shadow: 0 3px 12px rgba(17, 24, 39, .10); }
.btn:not(:disabled):active { transform: translateY(1px); box-shadow: none; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after {
    content: ""; position: absolute; width: 14px; height: 14px; left: 50%; top: 50%; margin: -7px 0 0 -7px;
    border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%;
    animation: spin .7s linear infinite;
}
.btn-ghost.loading::after { border-color: rgba(17,24,39,.2); border-top-color: var(--text-2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* 表格行：淡入 + 悬停过渡 */
table.data tbody tr { transition: background var(--dur) var(--ease); }
table.data.responsive tbody tr { animation: fade-in .3s var(--ease) both; }

/* 提示条滑入 */
.alert { animation: slide-down .3s var(--ease) both; }

/* 区块标题的强调条：展开动画 */
.section-title h2::before { transform-origin: left center; animation: bar-grow .5s var(--ease) both; }
.section-title.center h2::before { transform-origin: center; }

/* 滚动显现（JS 添加 .in，进入视口时播放；无 JS 时内容照常显示） */
html.js .reveal { opacity: 0; }
html.js .reveal.in { animation: fade-up .5s var(--ease) both; }

/* 顶栏滚动后加深边界 */
.topbar { transition: box-shadow var(--dur) var(--ease); }
.topbar.scrolled { box-shadow: 0 1px 12px rgba(17, 24, 39, .06); }

/* 图标轻交互（侧栏 / 功能格） */
.sidebar a.item svg, .feature .fi svg { transition: transform var(--dur) var(--ease); }
.sidebar a.item:hover svg { transform: translateX(1px); }
.feature:hover .fi svg { transform: scale(1.08); }

/* 无障碍：尊重系统的减少动效设置 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    html.js .reveal { opacity: 1; }
}

h1, h2, h3, h4 { margin: 0 0 10px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p  { margin: 0 0 10px; }
hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

svg { flex-shrink: 0; vertical-align: -0.18em; }

/* ---------------- 布局工具 ---------------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-2); }
.text-dim { color: var(--text-3); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--accent); }
.fw-600 { font-weight: 600; }
.mono { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------------- 顶部导航（公开页） ---------------- */
.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 60;
}
.topbar .inner {
    max-width: 1120px; margin: 0 auto; padding: 0 20px;
    height: 58px; display: flex; align-items: center; justify-content: space-between;
}
.brand {
    display: flex; align-items: center; gap: 9px;
    font-size: 15.5px; font-weight: 600; color: var(--text); letter-spacing: -.01em;
    white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand .logo {
    width: 26px; height: 26px; border-radius: 7px;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11.5px; font-weight: 700;
}
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a {
    color: var(--text-2); font-size: 14px;
    display: inline-flex; align-items: center; gap: 6px;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* 汉堡按钮（移动端） */
.burger {
    display: none;
    width: 38px; height: 38px; margin-right: -8px;
    background: none; border: none; border-radius: 8px;
    color: var(--text); cursor: pointer;
    align-items: center; justify-content: center;
    flex-shrink: 0;
}
.burger:hover { background: var(--subtle); }
.burger:active { background: var(--border); }

/* 移动端：隐藏顶部文字链接（改用汉堡菜单），避免挤成竖排 */
@media (max-width: 900px) {
    .nav-links { display: none; }
}

/* 移动端下拉导航 */
.mobile-nav {
    display: none;
    position: fixed; top: 58px; left: 0; right: 0; z-index: 55;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 8px 12px 14px;
    box-shadow: 0 12px 24px rgba(17, 24, 39, .06);
    max-height: calc(100dvh - 58px);
    overflow-y: auto;
}
.mobile-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: 8px;
    color: var(--text); font-size: 14.5px;
}
.mobile-nav a:hover { background: var(--subtle); }
.mobile-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mobile-nav .sep { height: 1px; background: var(--border); margin: 8px 4px; }
.mobile-nav .mna {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 12px; border-radius: 8px;
    background: var(--accent); color: #fff; font-weight: 600; font-size: 14.5px;
    margin-top: 6px;
}

/* 遮罩层（移动导航 / 侧栏抽屉共用） */
.overlay {
    display: none;
    position: fixed; inset: 0; z-index: 54;
    background: rgba(17, 24, 39, .38);
    border: none; padding: 0; cursor: default;
}
body.nav-open .overlay { display: block; }
body.nav-open .mobile-nav { display: block; }

/* ---------------- 侧栏布局（登录后） ---------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 218px; flex-shrink: 0;
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    z-index: 56;
}
.sidebar .brand { padding: 15px 18px; border-bottom: 1px solid var(--border); }
.sidebar nav { padding: 10px 10px 16px; flex: 1; }
.sidebar .group-title {
    font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
    color: var(--text-3); padding: 14px 10px 5px; font-weight: 600;
}
.sidebar a.item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px;
    color: var(--text-2); font-size: 14px; margin-bottom: 1px;
}
.sidebar a.item:hover { background: var(--subtle); color: var(--text); }
.sidebar a.item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar .side-foot { padding: 13px 16px; border-top: 1px solid var(--border); }

.sidebar .side-close { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-head {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 13px 24px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 40;
    min-height: 58px;
}
.main-head h1 { font-size: 17px; margin: 0; }
.main-head .burger { margin-left: -12px; margin-right: 8px; }
.main-body { padding: 22px 24px 60px; flex: 1; }

/* 移动端：侧栏变抽屉 */
@media (max-width: 900px) {
    .burger { display: inline-flex; }
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0;
        width: 264px; height: 100dvh;
        transform: translateX(-100%);
        transition: transform .22s ease;
    }
    body.nav-open .sidebar { transform: translateX(0); box-shadow: 24px 0 48px rgba(17, 24, 39, .10); }
    body.nav-open .sidebar .side-close { display: flex; }
    .main-head { padding: 11px 16px; }
    .main-body { padding: 16px 14px 56px; }
    .main-head .head-actions { display: none; }
}

/* ---------------- 卡片 ---------------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap;
}
.card-head h3 { margin: 0; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.card-head .head-note { font-size: 12px; color: var(--text-3); font-weight: 400; }
.card-body { padding: 18px; }
.card-body.compact { padding: 0; }

/* 统计卡 */
.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.stat .label {
    font-size: 12.5px; color: var(--text-2); margin-bottom: 5px;
    display: flex; align-items: center; gap: 6px;
}
.stat .value { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 8px 16px; border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 13.5px; font-weight: 600; font-family: inherit;
    cursor: pointer; line-height: 1.45; white-space: nowrap;
    background: var(--accent); color: #fff;
    transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost {
    background: var(--card); color: var(--text-2); border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--subtle); color: var(--text); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #991b1b; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #166534; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-link {
    background: none; border: none; padding: 0;
    color: var(--accent); font-weight: 600; font-size: 13px;
    cursor: pointer; font-family: inherit;
}
.btn-link.danger { color: var(--danger); }
.btn-link:hover { text-decoration: underline; }

/* ---------------- 表单 ---------------- */
.form-group { margin-bottom: 15px; }
.form-group > label {
    display: block; font-size: 12.5px; font-weight: 600;
    color: var(--text-2); margin-bottom: 6px;
}
.form-group .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=datetime-local], input[type=url], select, textarea {
    width: 100%; padding: 8px 11px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13.5px; font-family: inherit; color: var(--text);
    background: var(--card);
    transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}
input:disabled, select:disabled, textarea:disabled { background: var(--subtle); color: var(--text-3); }
textarea { resize: vertical; min-height: 84px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px;
}
.checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.checkbox input { width: auto; margin-top: 3px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

/* 五列表单（后台批量生成等），窄屏自动折叠 */
.form-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 13px; }
@media (max-width: 960px) { .form-grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .form-grid-5 { grid-template-columns: 1fr; } }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
    text-align: left; padding: 9px 14px;
    background: var(--subtle);
    color: var(--text-2); font-weight: 600; font-size: 12px;
    white-space: nowrap; border-bottom: 1px solid var(--border);
}
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fafafa; }
table.data .actions { white-space: nowrap; text-align: right; }
table.data th.right, table.data td.right { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- 移动端表格自适应 ----
   1) 普通表格：给最小宽度，宁可横向滚动也不把单元格压成一字一行的"竖排" */
@media (max-width: 640px) {
    .table-wrap table.data { min-width: 540px; }
}

/* 2) 加了 .responsive 的表格：手机上变成卡片堆叠（无横向滚动）
      用法：<th data-label="模型"> / <td data-label="模型"> */
@media (max-width: 640px) {
    table.data.responsive { min-width: 0; }
    table.data.responsive thead { display: none; }
    table.data.responsive tbody tr {
        display: block;
        padding: 10px 14px;
        border-bottom: 1px solid var(--border);
    }
    table.data.responsive tbody tr:last-child { border-bottom: none; }
    table.data.responsive tbody td {
        display: block;
        border: none;
        padding: 2px 0;
        text-align: left;
    }
    table.data.responsive tbody td::before {
        content: attr(data-label) "：";
        display: block;
        font-size: 11.5px;
        color: var(--text-3);
        margin-bottom: 1px;
    }
    table.data.responsive tbody td[data-label=""]::before { content: none; }
}

/* ---------------- 徽章 ---------------- */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 1.5px 8px; border-radius: 5px;
    font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap;
}
.badge-blue   { background: var(--accent-soft);  color: var(--accent); }
.badge-green  { background: var(--success-soft); color: var(--success); }
.badge-red    { background: var(--danger-soft);  color: var(--danger); }
.badge-yellow { background: var(--warning-soft); color: var(--warning); }
.badge-gray   { background: var(--subtle);       color: var(--text-2); }
.badge-violet { background: #f5f3ff;             color: #6d28d9; }

/* ---------------- 提示 ---------------- */
.alert {
    padding: 11px 14px; border-radius: var(--radius-sm);
    font-size: 13.5px; margin-bottom: 15px;
    border: 1px solid transparent;
}
.alert-success { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }
.alert-error   { background: var(--danger-soft);  color: var(--danger);  border-color: #fecaca; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: #fde68a; }
.alert-info    { background: var(--accent-soft);  color: #1e40af;        border-color: #bfdbfe; }

/* 首页 hero 角落装饰图标（轻浮动，纯装饰） */
.hero-decor {
    position: absolute; pointer-events: none;
    color: var(--accent); opacity: .10;
    display: block; line-height: 0;
}
.hero-decor.right { top: 38px; right: 56px; animation: float-y 6s var(--ease) infinite; }
.hero-decor.left { bottom: 34px; left: 52px; animation: float-y 7.5s var(--ease) infinite reverse; }
@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
@media (max-width: 900px) {
    .hero-decor.right { right: 18px; top: 20px; }
    .hero-decor.left { display: none; }
}
@media (max-width: 640px) {
    .hero-decor { display: none; }
}

/* ---------------- 认证页 ---------------- */
.auth-wrap {
    position: relative;
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}
/* 背景点阵装饰 */
.auth-wrap::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='2' cy='2' r='1.4' fill='%23d4dbe6'/%3E%3C/svg%3E");
    background-size: 14px 14px;
    -webkit-mask-image: radial-gradient(circle at 50% 42%, transparent 0 190px, #000 340px);
            mask-image: radial-gradient(circle at 50% 42%, transparent 0 190px, #000 340px);
}
.auth-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 400px;
    background: var(--card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 12px;
    padding: 30px 28px 26px;
}
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .mark {
    width: 38px; height: 38px; border-radius: 10px; margin: 0 auto 14px;
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); background: var(--accent-soft);
}
.auth-head h1 { font-size: 18px; margin-bottom: 4px; }
.auth-head p { color: var(--text-3); font-size: 13px; margin: 0; }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 18px; }

/* ---------------- 首页 ---------------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 68px; background: var(--card); border-bottom: 1px solid var(--border); }

/* 角落点阵装饰（细灰圆点 + 径向渐隐遮罩，纯装饰不响应交互） */
.hero::before, .hero::after {
    content: ""; position: absolute; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='2' cy='2' r='1.4' fill='%23c9d3e0'/%3E%3C/svg%3E");
    background-size: 14px 14px;
}
.hero::before {
    top: 0; right: 0; width: 240px; height: 170px;
    -webkit-mask-image: radial-gradient(circle at top right, #000 20%, transparent 74%);
            mask-image: radial-gradient(circle at top right, #000 20%, transparent 74%);
}
.hero::after {
    bottom: 0; left: 0; width: 240px; height: 170px;
    -webkit-mask-image: radial-gradient(circle at bottom left, #000 20%, transparent 74%);
            mask-image: radial-gradient(circle at bottom left, #000 20%, transparent 74%);
}
/* 正文浮在装饰层之上 */
.hero .container { position: relative; z-index: 1; }
.hero .container { max-width: 780px; text-align: center; }
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: var(--text-2);
    border: 1px solid var(--border); border-radius: 999px;
    padding: 4px 12px; margin-bottom: 22px; background: var(--card);
}
.hero h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 650; letter-spacing: -.025em; margin-bottom: 16px; }
.hero .sub { font-size: 15.5px; color: var(--text-2); max-width: 560px; margin: 0 auto 26px; }
.hero .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn { padding: 10px 22px; font-size: 14px; }
.hero .btn-outline { background: var(--card); color: var(--text); border-color: var(--border-strong); }
.hero .btn-outline:hover { background: var(--subtle); color: var(--text); }

.hero-stats {
    display: flex; justify-content: center;
    margin-top: 46px; flex-wrap: wrap;
}
.hero-stats > div {
    padding: 0 34px; text-align: center;
    border-left: 1px solid var(--border);
}
.hero-stats > div:first-child { border-left: none; }
.hero-stats .n { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-stats .l { font-size: 12.5px; color: var(--text-3); }
@media (max-width: 560px) {
    .hero { padding: 56px 0 48px; }
    .hero-stats > div { padding: 0 16px; }
}

.section { padding: 60px 0; }
.section-title { margin-bottom: 36px; max-width: 620px; }
.section-title.center { margin-left: auto; margin-right: auto; text-align: center; }
/* 标题上方的强调色短条 */
.section-title h2::before {
    content: ""; display: block;
    width: 26px; height: 3px; border-radius: 2px;
    background: var(--accent);
    margin-bottom: 10px;
}
.section-title.center h2::before { margin-left: auto; margin-right: auto; }
.section-title h2 { font-size: 22px; margin-bottom: 8px; }
.section-title p { color: var(--text-2); margin: 0; }

.feature {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px;
}
.feature .fi {
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 13px;
}
.feature h3 { font-size: 14.5px; margin-bottom: 6px; }
.feature p { color: var(--text-2); font-size: 13px; margin: 0; }

.step-num {
    width: 26px; height: 26px; border-radius: 999px;
    border: 1px solid var(--border-strong);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 600; color: var(--text-2);
    margin-bottom: 12px;
}

.model-chip {
    display: inline-flex; align-items: center;
    padding: 5px 12px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12.5px; font-family: var(--mono); color: var(--text-2);
    margin: 0 6px 8px 0;
}

.cta-band {
    position: relative; overflow: hidden;
    border-top: 1px solid var(--border);
    background: var(--card);
    padding: 52px 0;
    text-align: center;
}
.cta-band::before, .cta-band::after {
    content: ""; position: absolute; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='2' cy='2' r='1.4' fill='%23c9d3e0'/%3E%3C/svg%3E");
    background-size: 14px 14px;
    width: 200px; height: 100%;
    opacity: .6;
}
.cta-band::before { left: 0; top: 0;
    -webkit-mask-image: radial-gradient(circle at left center, #000 20%, transparent 70%);
            mask-image: radial-gradient(circle at left center, #000 20%, transparent 70%);
}
.cta-band::after { right: 0; top: 0;
    -webkit-mask-image: radial-gradient(circle at right center, #000 20%, transparent 70%);
            mask-image: radial-gradient(circle at right center, #000 20%, transparent 70%);
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { font-size: 20px; margin-bottom: 8px; }
.cta-band p { color: var(--text-2); margin-bottom: 20px; }

.footer {
    border-top: 1px solid var(--border);
    background: var(--card);
    padding: 22px 0;
    text-align: center; color: var(--text-3); font-size: 12.5px;
}

/* ---------------- 代码块 ---------------- */
pre.code {
    background: #1f2937; color: #e5e7eb;
    padding: 15px 17px; border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
    margin: 0;
}
pre.code .c { color: #9ca3af; }
code.inline {
    background: var(--subtle);
    padding: 1.5px 6px; border-radius: 5px;
    font-family: var(--mono); font-size: 12px; color: var(--text);
}

.key-display {
    font-family: var(--mono); font-size: 12.5px;
    background: var(--subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    word-break: break-all; color: var(--text);
}

/* ---------------- 分页 ---------------- */
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 32px; height: 32px; padding: 0 9px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--card); color: var(--text-2); font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--border-strong); color: var(--text); }
.pagination .active { background: var(--text); border-color: var(--text); color: #fff; font-weight: 600; }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ---------------- 进度条 ---------------- */
.progress { height: 5px; background: var(--subtle); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---------------- 柱状图 ---------------- */
.chart { display: flex; align-items: flex-end; gap: 5px; height: 140px; padding-top: 8px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.chart .bar .col {
    width: 100%; max-width: 30px;
    background: var(--accent); opacity: .85;
    border-radius: 4px 4px 2px 2px; min-height: 3px;
    transition: opacity .12s;
}
.chart .bar:hover .col { opacity: 1; }
.chart .bar .lbl { font-size: 10px; color: var(--text-3); white-space: nowrap; transform: rotate(-42deg); transform-origin: center; }

/* 移动端：日期标签改横排并隔根显示，避免旋转文字挤成一列列（竖排观感） */
@media (max-width: 640px) {
    .chart { gap: 3px; }
    .chart .bar .lbl { transform: none; font-size: 9px; letter-spacing: 0; }
    .chart .bar:nth-child(odd) .lbl { display: none; }
}

/* ---------------- 模态框 ---------------- */
.modal-mask {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(17, 24, 39, .44);
    display: flex; align-items: center; justify-content: center;
    padding: 18px;
}
.modal {
    background: var(--card);
    border-radius: 12px;
    width: 100%; max-width: 500px;
    max-height: 88vh; overflow-y: auto;
    box-shadow: 0 20px 50px rgba(17, 24, 39, .18);
}
.modal .modal-head {
    padding: 14px 20px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.modal .modal-head h3 { margin: 0; font-size: 14.5px; }
.modal .modal-body { padding: 18px 20px; }
.modal .modal-foot {
    padding: 13px 20px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 10px;
}
.modal .close {
    background: none; border: none; cursor: pointer;
    color: var(--text-3); padding: 4px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
}
.modal .close:hover { background: var(--subtle); color: var(--text); }

/* ---------------- 空状态（描边圆环衬底） ---------------- */
.empty { text-align: center; padding: 46px 20px; color: var(--text-3); font-size: 13.5px; }
.empty .ico {
    width: 60px; height: 60px;
    border: 1px solid var(--border);
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3);
    margin: 0 auto 12px;
}

/* ---------------- Tab ---------------- */
.tabs {
    display: flex; gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px; overflow-x: auto;
}
.tabs a {
    padding: 9px 14px; font-size: 13.5px; font-weight: 500; color: var(--text-2);
    border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------------- 批量操作条 ---------------- */
.bulk-bar {
    display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--accent-soft);
    border-radius: var(--radius) var(--radius) 0 0;
}
.bulk-bar .bfield { display: flex; flex-direction: column; gap: 3px; }
.bulk-bar label { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.bulk-bar input, .bulk-bar select { padding: 5px 9px; font-size: 12.5px; width: auto; min-width: 92px; }
.bulk-bar .bulk-count { font-size: 12.5px; color: var(--accent); font-weight: 600; margin-right: 4px; align-self: center; }
.bulk-bar .bulk-actions { display: flex; gap: 8px; margin-left: auto; align-self: flex-end; }

/* 勾选列 */
table.data .check-cell { width: 34px; text-align: center; padding-left: 14px; padding-right: 0; }
table.data .check-cell input { width: 15px; height: 15px; cursor: pointer; }
table.data tbody tr.selected { background: var(--accent-soft); }
table.data tbody tr.selected:hover { background: #e7f0ff; }

/* 行内状态开关 */
.status-toggle {
    background: none; border: none; padding: 0; cursor: pointer;
    font-family: inherit; font-size: 12px; font-weight: 600;
    color: var(--text-2);
    border-bottom: 1px dashed var(--border-strong);
}
.status-toggle:hover { color: var(--accent); border-bottom-color: var(--accent); }
.status-toggle[data-busy="1"] { opacity: .5; cursor: wait; }

/* ---------------- 轻量提示 Toast ---------------- */
.toast-wrap {
    position: fixed; right: 16px; bottom: 16px; z-index: 200;
    display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
    pointer-events: none;
}
.toast {
    background: var(--text); color: #fff;
    padding: 9px 14px; border-radius: 8px;
    font-size: 13px; max-width: 78vw;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .18);
    animation: toast-in .18s ease;
    transition: opacity .24s, transform .24s;
}
.toast-success { background: #166534; }
.toast-error { background: #991b1b; }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
    .toast-wrap { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
    .toast { max-width: none; text-align: center; }
    .bulk-bar { gap: 8px; padding: 10px 12px; }
    .bulk-bar input, .bulk-bar select { min-width: 78px; }
    .bulk-bar .bulk-actions { margin-left: 0; width: 100%; }
}

/* ---------------- 弹窗内的分区 / 分组卡 / 开关 / 标签 ---------------- */
.form-section { display: flex; gap: 12px; padding: 15px 0; border-top: 1px solid var(--border); }
.form-section:first-of-type { border-top: none; padding-top: 2px; }
.form-section > .fs-ico {
    flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.form-section > .fs-body { flex: 1; min-width: 0; }
.form-section h4 { margin: 3px 0 2px; font-size: 13.5px; font-weight: 600; }
.form-section .fs-desc { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }

/* 分组选择卡（移动端两列） */
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .group-grid { grid-template-columns: 1fr; } }
.group-card {
    position: relative; display: block; cursor: pointer;
    border: 1px solid var(--border); border-radius: 10px;
    padding: 9px 11px; background: var(--card);
    transition: border-color .18s var(--ease), background .18s var(--ease);
}
.group-card input { position: absolute; opacity: 0; pointer-events: none; }
.group-card .gc-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; }
.group-card .gc-desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.group-card:hover { border-color: var(--border-strong); }
.group-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.group-card .gc-badge {
    font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
    background: var(--subtle); color: var(--text-2); white-space: nowrap;
}
.group-card.is-active .gc-badge { background: #fff; color: var(--accent); }

/* 快捷标签（过期时间预设） */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.chip {
    border: 1px solid var(--border); background: var(--card); color: var(--text-2);
    border-radius: 999px; padding: 5px 12px; font-size: 12.5px;
    cursor: pointer; font-family: inherit;
    transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease);
}
.chip:hover { border-color: var(--border-strong); }
.chip.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* 开关 */
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
    flex: 0 0 42px; width: 42px; height: 24px; border-radius: 999px;
    background: var(--border-strong); position: relative; transition: background .2s var(--ease);
}
.switch .track::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .2s var(--ease);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch .sw-label { font-size: 13.5px; font-weight: 600; }
.switch .sw-hint { font-size: 11.5px; color: var(--text-3); font-weight: 400; }

/* 高级设置折叠区 */
.adv { margin-top: 4px; }
.adv > summary {
    cursor: pointer; list-style: none; padding: 13px 0;
    display: flex; align-items: center; gap: 9px;
    font-size: 13px; font-weight: 600;
    border-top: 1px solid var(--border);
}
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary .adv-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.adv[open] > summary { padding-bottom: 8px; }
.adv-body { padding-bottom: 6px; }

/* 模型勾选框 */
.pick-box { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 12px; }

/* 新建密钥结果面板 */
.key-result { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; margin-top: 8px; background: var(--card); }
.key-result .kr-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.key-result .mono { font-size: 12.5px; word-break: break-all; }

/* ---------------- 打印 ---------------- */
@media print {
    .sidebar, .topbar, .burger, .btn { display: none !important; }
}
