/* ==========================================================
   薯芯云授权中心 - 全局样式
   设计风格：简约白色 / 企业级 / 蓝色主题
   ========================================================== */

:root {
    --brand:        #1763f5;
    --brand-dark:   #0f4cd0;
    --brand-light:  #eaf1ff;
    --brand-glow:   rgba(23, 99, 245, .16);

    --bg:           #f6f8fc;
    --surface:      #ffffff;
    --surface-2:    #fafbfd;
    --border:       #e8ecf3;
    --border-strong:#d8dfea;

    --text:         #1a2233;
    --text-2:       #54617a;
    --text-3:       #8b97ae;

    --success:      #17a673;
    --success-bg:   #e8f8f2;
    --warning:      #e08700;
    --warning-bg:   #fff5e5;
    --danger:       #e0454c;
    --danger-bg:    #fdecec;
    --info:         #2b7fff;
    --info-bg:      #eaf3ff;

    --radius:       12px;
    --radius-sm:    8px;
    --radius-lg:    18px;

    --shadow-xs:    0 1px 2px rgba(20, 35, 70, .04);
    --shadow-sm:    0 2px 8px rgba(20, 35, 70, .06);
    --shadow:       0 6px 22px rgba(20, 35, 70, .08);
    --shadow-lg:    0 16px 48px rgba(20, 35, 70, .12);

    --sidebar-w:    240px;
    --header-h:     62px;
    --transition:   .18s cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; font-weight: 600; line-height: 1.3; }
h1 { font-size: 26px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }

img { max-width: 100%; }

/* ---------- 图标 ---------- */
.ico { display: inline-block; vertical-align: -0.16em; flex-shrink: 0; }

/* ==========================================================
   顶部导航（前台）
   ========================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.2px;
    white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.brand .brand-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: .5px;
    padding-left: 2px;
}

.nav-main { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-main a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-weight: 500;
    white-space: nowrap;
}
.nav-main a:hover { background: var(--surface-2); color: var(--text); }
.nav-main a.active { background: var(--brand-light); color: var(--brand); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ==========================================================
   容器 / 布局
   ========================================================== */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.container-narrow { max-width: 760px; }
.container-mid { max-width: 1000px; }

.page { padding: 30px 0 60px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin-bottom: 4px; }
.page-head .sub { color: var(--text-3); font-size: 13px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.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-0 { margin-top: 0; }
.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-3); }
.text-sm { font-size: 12.5px; }
.text-lg { font-size: 16px; }
.fw-600 { font-weight: 600; }

/* ==========================================================
   卡片
   ========================================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}
.card-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-head h3 .ico { color: var(--brand); }
.card-body { padding: 20px; }
.card-body.tight { padding: 14px 16px; }
.card-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ---------- 统计卡 ---------- */
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition), transform var(--transition);
}
.stat:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.stat-icon {
    width: 44px; height: 44px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-light);
    color: var(--brand);
    flex-shrink: 0;
}
.stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red    { background: var(--danger-bg);  color: var(--danger); }
.stat-icon.blue   { background: var(--info-bg);    color: var(--info); }
.stat-body { flex: 1; min-width: 0; }
.stat-label { font-size: 12.5px; color: var(--text-3); margin-bottom: 3px; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--text-3); }
.stat-trend { font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ==========================================================
   按钮
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    text-decoration: none;
    user-select: none;
}
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px var(--brand-glow); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); color: #fff; box-shadow: 0 4px 14px var(--brand-glow); transform: translateY(-1px); }

.btn-default { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-default:hover:not(:disabled) { background: var(--surface-2); border-color: var(--text-3); color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #12915f; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #c93a41; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover:not(:disabled) { background: #c47500; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 13px 28px; font-size: 15.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }
.btn-icon.btn-sm { width: 30px; height: 30px; padding: 6px; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================
   表单
   ========================================================== */
.form-group { margin-bottom: 17px; }
.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 7px;
    color: var(--text);
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-label .hint { font-weight: 400; color: var(--text-3); font-size: 12.5px; margin-left: 6px; }

.form-control {
    width: 100%;
    padding: 10px 13px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-control::placeholder { color: #a9b3c6; }
.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
.form-control:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b97ae' 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 12px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 100px; line-height: 1.65; }

.form-hint { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.form-error { font-size: 12.5px; color: var(--danger); margin-top: 5px; display: flex; align-items: center; gap: 4px; }

.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: none; }

.input-icon { position: relative; }
.input-icon .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .form-control { padding-left: 40px; }
.input-icon.has-suffix .form-control { padding-right: 42px; }
.input-icon .suffix {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); cursor: pointer; padding: 5px; border-radius: 6px;
    background: none; border: none; display: flex;
}
.input-icon .suffix:hover { color: var(--text); background: var(--surface-2); }

/* 复选框 / 单选框 */
.checkbox, .radio { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13.5px; user-select: none; }
.checkbox input, .radio input { margin: 3px 0 0; accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; inset: 0; cursor: pointer;
    background: #ccd4e0; border-radius: 24px; transition: var(--transition);
}
.switch .slider:before {
    content: ""; position: absolute; height: 18px; width: 18px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
    transition: var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider:before { transform: translateX(18px); }

/* 支付方式选择 */
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.pay-method {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 15px; border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition);
    background: var(--surface);
}
.pay-method:hover { border-color: var(--brand); }
.pay-method input { display: none; }
.pay-method.selected { border-color: var(--brand); background: var(--brand-light); box-shadow: 0 0 0 3px var(--brand-glow); }
.pay-method .pm-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 700; }
.pay-method .pm-icon.alipay { background: #1677ff; }
.pay-method .pm-icon.wxpay  { background: #07c160; }
.pay-method .pm-icon.qqpay  { background: #12b7f5; }
.pay-method .pm-name { font-weight: 500; font-size: 13.5px; }

/* ==========================================================
   徽章 / 状态
   ========================================================== */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; font-size: 12px; font-weight: 500;
    border-radius: 20px; line-height: 1.7; white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-muted   { background: #eef1f6;           color: var(--text-3); }
.badge-brand   { background: var(--brand-light); color: var(--brand); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ==========================================================
   表格
   ========================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left; padding: 12px 14px; font-weight: 600; font-size: 12.5px;
    color: var(--text-2); background: var(--surface-2);
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: var(--surface-2); }
.table .mono { font-family: "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace; font-size: 12.5px; letter-spacing: -.2px; }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-empty { padding: 46px 20px; text-align: center; color: var(--text-3); }
.table-empty .ico { width: 40px; height: 40px; color: #c8d1e0; margin-bottom: 10px; }

/* ==========================================================
   标签页
   ========================================================== */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a, .tabs button {
    padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--text-2);
    border: none; background: none; cursor: pointer; font-family: inherit;
    border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
    transition: all var(--transition); display: inline-flex; align-items: center; gap: 6px;
}
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs a.active, .tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { font-size: 11.5px; background: var(--border); color: var(--text-2); padding: 0 6px; border-radius: 10px; }
.tabs .active .count { background: var(--brand-light); color: var(--brand); }

/* 胶囊筛选 */
.pills { display: flex; gap: 7px; flex-wrap: wrap; }
.pill {
    padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
    cursor: pointer; transition: all var(--transition); text-decoration: none;
}
.pill:hover { border-color: var(--brand); color: var(--brand); }
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ==========================================================
   提示框
   ========================================================== */
.alert {
    display: flex; gap: 11px; padding: 13px 16px;
    border-radius: var(--radius-sm); font-size: 13.5px;
    border: 1px solid transparent; margin-bottom: 18px; line-height: 1.65;
}
.alert .ico { margin-top: 2px; flex-shrink: 0; }
.alert-info    { background: var(--info-bg);    border-color: #cfe2ff; color: #1a5fb4; }
.alert-success { background: var(--success-bg); border-color: #c3ecd9; color: #0d7a52; }
.alert-warning { background: var(--warning-bg); border-color: #ffe0b2; color: #97550a; }
.alert-danger  { background: var(--danger-bg);  border-color: #f8d0d1; color: #b02830; }

/* ==========================================================
   分页
   ========================================================== */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.pager ul { display: flex; gap: 5px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pager li a, .pager li span {
    display: flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 10px;
    border: 1px solid var(--border-strong); border-radius: 8px;
    font-size: 13.5px; color: var(--text-2); background: var(--surface);
    transition: all var(--transition);
}
.pager li a:hover { border-color: var(--brand); color: var(--brand); }
.pager li.active a, .pager li.active span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager li.dots { padding: 0 4px; color: var(--text-3); align-self: center; }
.pager-info { font-size: 12.5px; color: var(--text-3); }

/* ==========================================================
   模态框
   ========================================================== */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(20, 30, 55, .42);
    backdrop-filter: blur(3px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.show { display: flex; animation: fadeIn .16s ease; }
.modal {
    background: var(--surface); border-radius: var(--radius-lg);
    width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
    box-shadow: var(--shadow-lg); animation: modalIn .22s cubic-bezier(.2,.8,.3,1);
}
.modal.modal-lg { max-width: 680px; }
.modal-head {
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { margin: 0; font-size: 16.5px; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-3); padding: 4px; border-radius: 6px; display: flex; }
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 24px; }
.modal-foot {
    padding: 16px 24px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98) } to { opacity: 1; transform: none } }

/* Toast 提示 */
#toast-box { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: 9px;
    padding: 11px 20px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
    background: var(--text); color: #fff; box-shadow: var(--shadow-lg);
    animation: toastIn .24s cubic-bezier(.2,.8,.3,1); pointer-events: auto; max-width: 90vw;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-18px) } to { opacity: 1; transform: none } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px) } }

/* ==========================================================
   后台布局
   ========================================================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 200;
    transition: transform var(--transition);
}
.sidebar-brand {
    height: var(--header-h); display: flex; align-items: center; gap: 10px;
    padding: 0 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sidebar-brand img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; }
.sidebar-brand .txt { font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; }
.sidebar-brand .txt small { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-3); letter-spacing: .6px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sidebar-nav .group-label {
    font-size: 11px; font-weight: 600; color: var(--text-3);
    text-transform: uppercase; letter-spacing: .8px; padding: 14px 10px 7px;
}
.sidebar-nav .group-label:first-child { padding-top: 4px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 9.5px 12px; border-radius: 9px; margin-bottom: 2px;
    color: var(--text-2); font-size: 13.8px; font-weight: 500;
    transition: all var(--transition);
}
.sidebar-nav a .ico { color: var(--text-3); transition: color var(--transition); }
.sidebar-nav a:hover { background: var(--surface-2); color: var(--text); }
.sidebar-nav a:hover .ico { color: var(--text-2); }
.sidebar-nav a.active { background: var(--brand-light); color: var(--brand); font-weight: 600; }
.sidebar-nav a.active .ico { color: var(--brand); }
.sidebar-nav a .nbadge {
    margin-left: auto; font-size: 11px; font-weight: 600; padding: 1px 7px;
    border-radius: 10px; background: var(--danger); color: #fff;
}

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: var(--header-h); flex-shrink: 0;
    background: rgba(255,255,255,.9); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px; padding: 0 22px;
    position: sticky; top: 0; z-index: 90;
}
.topbar .menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text-2); padding: 6px; border-radius: 8px; }
.topbar .menu-toggle:hover { background: var(--surface-2); }
.topbar h2 { font-size: 16.5px; margin: 0; flex: 1; }
.topbar .tb-search { position: relative; width: 220px; }
.topbar .tb-actions { display: flex; align-items: center; gap: 8px; }

.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), #4f8cff);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.user-menu { position: relative; }
.user-menu-btn {
    display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px;
    border-radius: 30px; border: 1px solid transparent; background: none;
    cursor: pointer; font-family: inherit; transition: all var(--transition);
}
.user-menu-btn:hover { background: var(--surface-2); border-color: var(--border); }
.user-menu-btn .uname { font-size: 13.5px; font-weight: 500; color: var(--text); }
.user-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 6px; display: none; animation: modalIn .16s ease;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border-radius: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 500;
}
.user-dropdown a:hover { background: var(--surface-2); color: var(--text); }
.user-dropdown a.danger { color: var(--danger); }
.user-dropdown a.danger:hover { background: var(--danger-bg); }
.user-dropdown .divider { height: 1px; background: var(--border); margin: 5px 0; }
.user-dropdown .dd-head { padding: 10px 12px 8px; }
.user-dropdown .dd-head .n { font-weight: 600; font-size: 14px; }
.user-dropdown .dd-head .e { font-size: 12px; color: var(--text-3); }

.content { padding: 24px 22px 44px; flex: 1; }
.content-head { margin-bottom: 22px; }

/* ==========================================================
   空状态
   ========================================================== */
.empty { text-align: center; padding: 56px 20px; color: var(--text-3); }
.empty .ico { width: 44px; height: 44px; color: #c4cfdf; margin: 0 auto 14px; }
.empty h3 { font-size: 16px; color: var(--text-1); margin: 0 0 8px; font-weight: 600; }
.empty p { font-size: 13.5px; margin: 0 auto 22px; max-width: 420px; line-height: 1.7; color: var(--text-2); }
/* 空状态操作区：按钮固定中等尺寸并居中，避免单页 CTA 视觉过大 */
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.empty .btn { margin: 0; font-size: 14px; padding: 9px 22px; min-width: 0; }

/* ==========================================================
   登录 / 注册页
   ========================================================== */
.auth-wrap {
    /* 用 min-height 而非 height：内容超高时容器跟着长高，页面可以整体滚动。
       这里不能用 overflow:hidden —— 它会让容器变成滚动容器，把底部内容裁掉且无法滑动，
       表现为「登录/注册页底部按钮和文字被切掉、页面又滑不动」。 */
    min-height: 100vh;
    display: flex;
    align-items: flex-start;          /* 内容超高时从顶部排布，不做居中裁切 */
    justify-content: center;
    padding: 30px 20px;
    position: relative;
    background: linear-gradient(170deg, #f3f7ff 0%, #f9fbff 42%, #f6f8fc 100%);
}
/* 移动端浏览器地址栏收放时 100vh 会偏高，优先用动态视口高度 */
@supports (min-height: 100dvh) {
    .auth-wrap { min-height: 100dvh; }
}
/* 内容不够高时仍然垂直居中：auto 外边距在内容超高时会自动归零，不会造成裁切 */
.auth-wrap > .auth-card,
.auth-wrap > .reg-shell { margin-top: auto; margin-bottom: auto; }

/* 装饰光斑单独放一层并裁切，避免它们撑出多余的滚动高度 */
.auth-deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.auth-bg-deco { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.auth-bg-deco.d1 { width: 420px; height: 420px; background: rgba(23,99,245,.16); top: -140px; right: -100px; }
.auth-bg-deco.d2 { width: 360px; height: 360px; background: rgba(79,140,255,.14); bottom: -120px; left: -90px; }
.auth-bg-deco.d3 { width: 260px; height: 260px; background: rgba(79,140,255,.1); top: 40%; left: 12%; }

.auth-card {
    position: relative; z-index: 2; width: 100%; max-width: 420px;
    background: rgba(255,255,255,.92); backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 20px; box-shadow: var(--shadow-lg); padding: 38px 34px;
}
.auth-card .auth-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-card .auth-logo img { width: 62px; height: 62px; object-fit: contain; }
.auth-card .auth-logo h1 { font-size: 21px; margin: 0; letter-spacing: -.3px; }
.auth-card .auth-logo p { font-size: 13px; color: var(--text-3); margin: 0; }
.auth-card .auth-foot { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--text-3); }
.auth-card .auth-foot a { font-weight: 500; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-3); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ==========================================================
   提示结果页
   ========================================================== */
.msg-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 24px; }
.msg-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); padding: 44px 40px; max-width: 460px; text-align: center;
}
.msg-card .msg-icon { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.msg-card .msg-icon .ico { width: 30px; height: 30px; }
.msg-card h2 { font-size: 19px; margin-bottom: 10px; }
.msg-card p { color: var(--text-2); font-size: 14px; margin-bottom: 24px; }
.msg-info .msg-icon { background: var(--info-bg); color: var(--info); }
.msg-success .msg-icon { background: var(--success-bg); color: var(--success); }
.msg-error .msg-icon { background: var(--danger-bg); color: var(--danger); }
.msg-warning .msg-icon { background: var(--warning-bg); color: var(--warning); }

/* ==========================================================
   首页 Hero
   ========================================================== */
.hero {
    position: relative; overflow: hidden; padding: 66px 0 60px;
    background: linear-gradient(168deg, #f4f8ff 0%, #fbfcff 55%, #f6f8fc 100%);
    border-bottom: 1px solid var(--border);
}
.hero-deco { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.hero-deco.a { width: 380px; height: 380px; background: rgba(23,99,245,.14); top: -130px; right: -60px; }
.hero-deco.b { width: 300px; height: 300px; background: rgba(79,140,255,.12); bottom: -110px; left: -70px; }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center; }
.hero-tag {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px;
    background: var(--brand-light); color: var(--brand); border-radius: 20px;
    font-size: 12.5px; font-weight: 600; margin-bottom: 18px;
}
.hero h1 { font-size: 38px; line-height: 1.22; letter-spacing: -.8px; margin-bottom: 16px; }
.hero h1 .hl { color: var(--brand); }
.hero .lead { font-size: 15.5px; color: var(--text-2); line-height: 1.75; margin-bottom: 26px; max-width: 520px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stat .v { font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.hero-stat .l { font-size: 12.5px; color: var(--text-3); }

.hero-panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-panel .hp-bar {
    height: 38px; background: var(--surface-2); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 7px; padding: 0 14px;
}
.hero-panel .hp-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e0e5ee; }
.hero-panel .hp-bar i:nth-child(1) { background: #ff5f57; }
.hero-panel .hp-bar i:nth-child(2) { background: #febc2e; }
.hero-panel .hp-bar i:nth-child(3) { background: #28c840; }
.hero-panel .hp-bar span { margin-left: 8px; font-size: 12px; color: var(--text-3); font-family: "SF Mono", Consolas, monospace; }
.code-block {
    margin: 0; padding: 18px; font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
    font-size: 12.5px; line-height: 1.85; color: #2c3b57; background: #fbfcfe; overflow-x: auto;
    white-space: pre;
}
.code-block .c-key { color: #1763f5; }
.code-block .c-str { color: #0d8a5f; }
.code-block .c-com { color: #9aa5b8; }
.code-block .c-fn  { color: #a350d0; }

/* 特性卡片 */
.feature {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px 22px; height: 100%;
    transition: all var(--transition);
}
.feature:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); border-color: var(--border-strong); }
.feature .f-icon {
    width: 44px; height: 44px; border-radius: 12px; background: var(--brand-light);
    color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 15px;
}
.feature h3 { font-size: 15.5px; margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--text-2); margin: 0; line-height: 1.7; }

/* 套餐卡 */
.plan {
    position: relative; background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 26px 24px; display: flex; flex-direction: column;
    transition: all var(--transition);
}
.plan:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-3px); }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.plan .plan-flag {
    position: absolute; top: -11px; right: 20px; padding: 3px 12px;
    background: var(--brand); color: #fff; border-radius: 20px; font-size: 11.5px; font-weight: 600;
}
.plan .plan-name { font-size: 17px; font-weight: 700; margin-bottom: 5px; }
.plan .plan-desc { font-size: 12.5px; color: var(--text-3); min-height: 20px; margin-bottom: 16px; }
.plan .plan-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 20px; }
.plan .plan-price .cur { font-size: 17px; font-weight: 600; color: var(--brand); }
.plan .plan-price .num { font-size: 34px; font-weight: 700; letter-spacing: -1px; color: var(--brand); line-height: 1; }
.plan .plan-price .orig { font-size: 13px; color: var(--text-3); text-decoration: line-through; }
.plan .plan-feats { list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
.plan .plan-feats li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--text-2); padding: 6.5px 0; }
.plan .plan-feats li .ico { color: var(--success); margin-top: 3px; flex-shrink: 0; }

.section-head { text-align: center; max-width: 620px; margin: 0 auto 34px; }
.section-head .eyebrow { font-size: 12.5px; font-weight: 600; color: var(--brand); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.section-head h2 { font-size: 27px; letter-spacing: -.5px; margin-bottom: 10px; }
.section-head p { color: var(--text-2); font-size: 14.5px; margin: 0; }

/* ==========================================================
   页脚
   ========================================================== */
.site-footer {
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 34px 0 26px; margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 34px; margin-bottom: 26px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 13px; color: var(--text-3); line-height: 1.7; margin: 0; max-width: 300px; }
.footer-col h4 { font-size: 13.5px; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-2); padding: 4.5px 0; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
    border-top: 1px solid var(--border); padding-top: 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--text-3);
}

/* ==========================================================
   杂项
   ========================================================== */
.kv-list { display: flex; flex-direction: column; gap: 0; }
.kv-item { display: flex; padding: 11px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.kv-item:last-child { border-bottom: none; }
.kv-item .k { width: 130px; flex-shrink: 0; color: var(--text-3); }
.kv-item .v { flex: 1; color: var(--text); word-break: break-all; }
/* 只读长文本展示（工单 / 举报详情等），保留换行 */
.detail-box {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px; font-size: 13.5px; line-height: 1.75; color: var(--text-2);
    white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow-y: auto;
}

.copy-cell { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.copy-cell .k { color: var(--text-3); font-size: 12.5px; flex-shrink: 0; }

/* 兑换成功结果面板 */
.redeem-ok { text-align: center; padding: 8px 0 4px; animation: czxFadeUp .4s cubic-bezier(.22,.8,.3,1) both; }
.redeem-ok-ic { color: var(--success); display: flex; justify-content: center; margin-bottom: 10px; }
.redeem-ok h3 { margin: 0 0 6px; font-size: 18px; color: var(--text-1); }
.redeem-ok > p { margin: 0; }
.redeem-ok .copy-cell {
    display: flex; justify-content: center; gap: 8px; width: 100%;
    background: var(--surface-2); border: 1px dashed var(--border-strong);
    border-radius: 10px; padding: 10px 12px;
}
.redeem-ok .copy-cell .val { flex: 1; text-align: left; color: var(--text-1); }
.copy-cell .val { font-family: "SF Mono", Consolas, monospace; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-cell button { background: none; border: none; cursor: pointer; color: var(--text-3); padding: 3px; border-radius: 5px; display: flex; }
.copy-cell button:hover { color: var(--brand); background: var(--brand-light); }

.license-key {
    display: inline-block; font-family: "SF Mono", Consolas, monospace;
    font-size: 12.5px; letter-spacing: -.2px; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 3px 9px; border-radius: 6px; word-break: break-all;
}

.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 10px 0; }
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-chart .bar {
    width: 100%; max-width: 38px; background: linear-gradient(180deg, var(--brand), #4f8cff);
    border-radius: 6px 6px 3px 3px; min-height: 4px; transition: all var(--transition);
    position: relative;
}
.bar-chart .bar:hover { filter: brightness(1.08); }
.bar-chart .bar-label { font-size: 11px; color: var(--text-3); white-space: nowrap; }

.progress { height: 7px; background: var(--border); border-radius: 10px; overflow: hidden; }
.progress .bar-inner { height: 100%; background: linear-gradient(90deg, var(--brand), #4f8cff); border-radius: 10px; transition: width .4s ease; }

.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f6f8fc 50%, #eef1f6 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }

/* ---------- Loading Spinner ---------- */
.spinner {
    display: inline-block; width: 15px; height: 15px; vertical-align: -2px;
    border: 2px solid currentColor; border-top-color: transparent;
    border-radius: 50%; animation: spin .7s linear infinite; margin-right: 7px; opacity: .85;
}
.spinner-lg { width: 34px; height: 34px; border-width: 3px; color: var(--brand); margin: 0; }
@keyframes spin { to { transform: rotate(360deg) } }

/* ---------- 页面切换过渡 ---------- */
.fade-up { animation: fadeUp .32s cubic-bezier(.2,.8,.3,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

/* ---------- 代码内联 ---------- */
code {
    font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
    font-size: .92em; background: var(--surface-2); color: #c0392b;
    padding: 1.5px 6px; border-radius: 5px; border: 1px solid var(--border);
}
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }

.divider { height: 1px; background: var(--border); margin: 20px 0; border: none; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; margin: 20px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ==========================================================
   响应式
   ========================================================== */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 34px; }
    .hero h1 { font-size: 31px; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 820px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
    .topbar .menu-toggle { display: flex; }
    .nav-main { display: none; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .grid-aside { grid-template-columns: 1fr; }
    .topbar .tb-search { display: none; }
    .sidebar-backdrop {
        position: fixed; inset: 0; background: rgba(20,30,55,.4); z-index: 190; display: none;
    }
    .sidebar-backdrop.show { display: block; }
}

@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .content { padding: 18px 16px 40px; }
    .hero { padding: 42px 0 40px; }
    .hero h1 { font-size: 26px; }
    .hero-stats { gap: 22px; }
    .grid-4 { grid-template-columns: 1fr; }
    .auth-card { padding: 28px 22px; }
    .stat-value { font-size: 21px; }
    .card-body { padding: 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .table th, .table td { padding: 10px 11px; }
    .modal-body { padding: 18px; }
}

/* ===== 法律/协议正文排版 ===== */
.legal-body { font-size: 14.5px; line-height: 1.9; color: var(--text-2); }
.legal-body h3 {
    font-size: 15.5px; font-weight: 600; color: var(--text-1);
    margin: 22px 0 10px; padding-left: 11px; position: relative; line-height: 1.5;
}
.legal-body h3:first-child { margin-top: 0; }
.legal-body h3::before {
    content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
    width: 3px; border-radius: 2px; background: var(--brand);
}
.legal-body p { margin: 0 0 10px; }
.legal-body strong { color: var(--text-1); font-weight: 600; }
.legal-body a { color: var(--brand); text-decoration: none; }
.legal-body a:hover { text-decoration: underline; }

/* ===== 文档门户布局 ===== */
.docs-layout { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
.docs-side { position: sticky; top: 84px; padding: 16px 14px; }
.docs-side-title { font-size: 13px; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.docs-nav { display: flex; flex-direction: column; gap: 2px; }
.docs-nav a {
    display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
    font-size: 13.5px; color: var(--text-2); text-decoration: none; transition: all .15s;
}
.docs-nav a:hover { background: var(--bg-2); color: var(--brand); }
.docs-nav a.active { background: var(--brand-light); color: var(--brand); font-weight: 600; }
.docs-nav a svg { flex: 0 0 auto; }
.docs-side-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.docs-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.docs-sec { scroll-margin-top: 84px; }
.docs-sec .card-head h2 { font-size: 17px; display: flex; align-items: center; gap: 9px; }
.docs-p { font-size: 14px; color: var(--text-2); line-height: 1.8; margin: 0 0 14px; }
.docs-h3 { font-size: 14.5px; font-weight: 600; color: var(--text-1); margin: 20px 0 10px; }
.docs-h3:first-child { margin-top: 0; }
.docs-ol { font-size: 14px; color: var(--text-2); line-height: 2; padding-left: 20px; margin: 0 0 14px; }
.docs-ol code, .docs-p code, .callout code, .faq code { background: var(--bg-2); padding: 1.5px 6px; border-radius: 5px; font-size: 12.5px; color: var(--brand); font-family: ui-monospace, Menlo, Consolas, monospace; }
.code-block {
    background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 16px 18px;
    font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.8px; line-height: 1.75;
    overflow-x: auto; margin: 0 0 14px; border: 1px solid #1e293b;
}
.code-block code { background: none; color: inherit; padding: 0; font-size: inherit; }
.steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.step-item { display: flex; gap: 13px; align-items: flex-start; }
.step-num {
    flex: 0 0 auto; width: 27px; height: 27px; border-radius: 50%; background: var(--brand);
    color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step-item strong { font-size: 14px; color: var(--text-1); }
.step-item p { font-size: 13.3px; color: var(--text-2); line-height: 1.7; margin: 3px 0 0; }
.step-item a { color: var(--brand); text-decoration: none; }
.callout {
    display: flex; gap: 11px; padding: 13px 16px; border-radius: 10px; margin: 0 0 14px;
    font-size: 13.3px; line-height: 1.75; align-items: flex-start;
}
.callout svg { flex: 0 0 auto; margin-top: 2px; }
.callout-info { background: var(--brand-light); color: #1a4fb4; }
.callout-warn { background: #fff8ec; color: #92600a; border: 1px solid #fbe3b8; }
.sdk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.sdk-card {
    border: 1px solid var(--border); border-radius: 12px; padding: 18px 16px; text-align: center;
    display: flex; flex-direction: column; transition: all .18s;
}
.sdk-card:hover { border-color: var(--brand); box-shadow: 0 6px 20px rgba(23,99,245,.1); transform: translateY(-2px); }
.sdk-lang { margin-bottom: 8px; }
.sdk-name { font-size: 14.5px; font-weight: 600; color: var(--text-1); margin-bottom: 7px; }
.sdk-desc { font-size: 12.6px; color: var(--text-2); line-height: 1.65; flex: 1; margin-bottom: 10px; }
.sdk-files { font-size: 11.5px; color: var(--text-3, #94a3b8); font-family: ui-monospace, monospace; margin-bottom: 13px; word-break: break-all; }
.tabs-static { display: flex; gap: 6px; margin-bottom: 0; }
.tabs-static span {
    font-size: 12.5px; padding: 6px 14px; border-radius: 8px 8px 0 0; background: var(--bg-2);
    color: var(--text-2); border: 1px solid var(--border); border-bottom: none;
}
.tabs-static span.active { background: #0f172a; color: #e2e8f0; border-color: #0f172a; }
.tabs-static + .code-block { border-radius: 0 10px 10px 10px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.faq summary {
    padding: 13px 16px; font-size: 13.8px; font-weight: 600; color: var(--text-1); cursor: pointer;
    list-style: none; position: relative; padding-right: 40px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    font-size: 19px; font-weight: 400; color: var(--text-3, #94a3b8); transition: transform .2s;
}
.faq[open] summary::after { content: '−'; }
.faq summary:hover { background: var(--bg-2); }
.faq p { margin: 0; padding: 0 16px 15px; font-size: 13.4px; color: var(--text-2); line-height: 1.85; }
.faq p a { color: var(--brand); text-decoration: none; }
.faq p a:hover { text-decoration: underline; }
.badge-danger { background: #fef2f2; color: #dc2626; }

@media (max-width: 900px) {
    .docs-layout { grid-template-columns: 1fr; }
    .docs-side { position: static; }
    .docs-nav { flex-direction: row; flex-wrap: wrap; }
    .sdk-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   变量别名 & 兼容
   ========================================================== */
:root {
    --text-1: var(--text);
    --bg-2:   var(--surface-2);
    --brand-2: #4f8bff;
}

/* ==========================================================
   动效体系
   ========================================================== */
@keyframes czxFadeUp   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes czxFadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes czxScaleIn  { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes czxFloat    { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes czxSpin     { to { transform: rotate(360deg); } }
@keyframes czxShake    { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-5px); } 40%,80% { transform: translateX(5px); } }
@keyframes czxPulse    { 0% { box-shadow: 0 0 0 0 var(--brand-glow); } 70% { box-shadow: 0 0 0 12px rgba(23,99,245,0); } 100% { box-shadow: 0 0 0 0 rgba(23,99,245,0); } }
@keyframes czxRipple   { to { transform: scale(2.6); opacity: 0; } }
@keyframes czxFall     { to { transform: translateY(112vh) rotate(540deg); opacity: .9; } }
@keyframes czxDash     { to { stroke-dashoffset: 0; } }
@keyframes czxBar      { from { width: 0; } to { width: 100%; } }
@keyframes czxShimmer  { 100% { transform: translateX(100%); } }

.fade-up { animation: czxFadeUp .5s cubic-bezier(.22,.8,.3,1) both; }
.fade-in { animation: czxFadeIn .5s ease both; }
.scale-in { animation: czxScaleIn .28s cubic-bezier(.22,.9,.3,1) both; }

/* 滚动入场 */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.22,.8,.3,1), transform .6s cubic-bezier(.22,.8,.3,1); }
[data-reveal].revealed { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }

/* 按钮涟漪 + 微交互 */
.btn { position: relative; overflow: hidden; }
.btn::after {
    content: ''; position: absolute; left: var(--rx, 50%); top: var(--ry, 50%);
    width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55);
    transform: scale(0); opacity: 0; pointer-events: none;
}
.btn.rippling::after { animation: czxRipple .6s ease-out; }
.btn:active { transform: translateY(1px) scale(.99); }
.card { transition: box-shadow .22s var(--transition), transform .22s var(--transition), border-color .22s var(--transition); }
.card:hover { box-shadow: var(--shadow-sm); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(90deg, #eef2f8 25%, #f6f8fc 37%, #eef2f8 63%);
    background-size: 400% 100%; border-radius: 6px; position: relative; overflow: hidden;
    animation: czxSpin 0s;
}
.skeleton::after {
    content: ''; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
    animation: czxShimmer 1.3s infinite;
}

/* ==========================================================
   前台导航 - 移动端
   ========================================================== */
.nav-toggle {
    display: none; width: 38px; height: 38px; border: 1px solid var(--border);
    background: var(--surface); border-radius: 10px; cursor: pointer; align-items: center;
    justify-content: center; color: var(--text-2); padding: 0;
}
.nav-toggle:hover { border-color: var(--brand); color: var(--brand); }
.nav-drawer {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 10px 16px 18px; z-index: 120;
}
.nav-drawer.open { display: block; animation: czxFadeUp .26s ease both; }
.nav-drawer a {
    display: flex; align-items: center; gap: 10px; padding: 12px 12px; border-radius: 10px;
    color: var(--text-2); text-decoration: none; font-size: 15px; transition: var(--transition);
}
.nav-drawer a:hover, .nav-drawer a.active { background: var(--brand-light); color: var(--brand); }
.nav-drawer .drawer-actions { display: flex; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.nav-drawer .drawer-actions .btn { flex: 1; justify-content: center; }
/* 注意：不要在这里把 .site-header 改成 position:relative —— 会覆盖前面的 sticky，
   导致前台导航失去吸顶（手机滑动后菜单按钮消失）。
   sticky 元素本身就是定位祖先，.nav-drawer 的 absolute 定位依然正常。 */

/* ==========================================================
   后台/控制台 移动端增强
   ========================================================== */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.table { min-width: 640px; }

.filter-bar { margin-bottom: 16px; }
.filter-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-item { display: flex; flex-direction: column; gap: 6px; min-width: 160px; flex: 1 1 160px; }
.filter-item label { font-size: 12.5px; color: var(--text-3); font-weight: 500; margin: 0; }
.filter-item .form-control { height: 38px; }
.filter-submit { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; }

.tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; flex: 0 0 auto; }

.td-actions { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; row-gap: 6px; }
.btn-icon.danger { color: var(--danger); }
.btn-icon.danger:hover { background: var(--danger-bg); color: var(--danger); }

.table-empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 42px 20px; color: var(--text-3);
}
.table-empty p { margin: 0; font-size: 13.5px; }

.empty-state {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 52px 24px; gap: 8px;
}
.empty-state .empty-icon {
    width: 66px; height: 66px; border-radius: 50%; background: var(--brand-light);
    color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.empty-state h3 { margin: 0; font-size: 16px; color: var(--text-1); }
.empty-state p { margin: 0 0 14px; font-size: 13.5px; color: var(--text-2); max-width: 380px; line-height: 1.7; }

.divider-line {
    display: flex; align-items: center; gap: 12px; margin: 22px 0 16px;
    font-size: 12.5px; color: var(--text-3); font-weight: 600;
}
.divider-line::before, .divider-line::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-mini {
    display: flex; align-items: center; gap: 12px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
    transition: var(--transition);
}
.stat-mini:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.stat-mini .ic { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.stat-mini .ic.warn { background: var(--warning-bg); color: var(--warning); }
.stat-mini .ic.danger { background: var(--danger-bg); color: var(--danger); }
.stat-mini .ic.brand { background: var(--brand-light); color: var(--brand); }
.stat-mini .ic.info { background: var(--info-bg, #e8f1ff); color: var(--info, #1763f5); }
.stat-mini .ic.ok { background: var(--success-bg, #e6f7ee); color: var(--success, #16a34a); }
.stat-mini .ic.muted { background: var(--fill, #f1f4f9); color: var(--text-3, #8b97ae); }
a.stat-mini { color: inherit; text-decoration: none; }
.stat-mini b { display: block; font-size: 19px; color: var(--text-1); line-height: 1.25; }
.stat-mini span { font-size: 12.5px; color: var(--text-3); }

.row-warn { background: #fffdf7; }
.badge-brand { background: var(--brand-light); color: var(--brand); }

/* 应用卡片 */
.app-card .card-head h3 { display: flex; align-items: center; gap: 7px; }
.app-key-box {
    display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 9px;
    background: var(--surface-2); border: 1px dashed var(--border-strong);
    font-size: 12.4px; cursor: pointer; transition: var(--transition); margin-bottom: 8px;
}
.app-key-box:hover { border-color: var(--brand); background: var(--brand-light); }
.app-key-box .lab { font-size: 10.5px; font-weight: 700; color: var(--text-3); letter-spacing: .5px; flex: 0 0 auto; }
.app-key-box .mono { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.app-key-box svg { flex: 0 0 auto; color: var(--text-3); }

/* ==========================================================
   注册向导
   ========================================================== */
.reg-page { background: linear-gradient(168deg, #f4f8ff 0%, #f6f8fc 42%, #eef3fd 100%); }
.reg-wrap { padding: 34px 18px; align-items: flex-start; }
.reg-shell {
    position: relative; z-index: 2; width: 100%; max-width: 880px; margin: 0 auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
    box-shadow: var(--shadow-lg); padding: 0; overflow: hidden;
    display: flex; align-items: stretch;
}
/* 左侧品牌栏：渐变背景 + 吉祥物 + 卖点（桌面端常驻） */
.reg-aside {
    flex: 0 0 320px; position: relative; color: #fff; padding: 34px 30px;
    background: linear-gradient(157deg, #2a72ff 0%, #1763f5 52%, #0f3fb0 100%);
    display: flex; flex-direction: column; overflow: hidden;
}
.reg-aside::before, .reg-aside::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none; opacity: .16;
}
.reg-aside::before { width: 230px; height: 230px; right: -80px; top: -70px; background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0) 70%); }
.reg-aside::after  { width: 190px; height: 190px; left: -70px; bottom: -60px; background: radial-gradient(circle, #9fe6ff 0%, rgba(159,230,255,0) 70%); }
.reg-aside-head { display: flex; align-items: center; gap: 10px; position: relative; }
.reg-aside-head img { width: 40px; height: 40px; border-radius: 11px; background: #fff; padding: 5px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.reg-aside-head span { font-size: 18px; font-weight: 800; letter-spacing: .5px; }
.reg-aside-mascot { margin: 18px auto 4px; width: 172px; position: relative; }
.reg-aside-mascot .mascot { margin: 0; }
.reg-aside-mascot .mascot-svg { width: 160px; height: 150px; }
.reg-aside-title { font-size: 23px; line-height: 1.42; margin: 8px 0 20px; font-weight: 800; position: relative; }
.reg-aside-feats { list-style: none; padding: 0; margin: 0 0 auto; display: flex; flex-direction: column; gap: 13px; position: relative; }
.reg-aside-feats li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; opacity: .96; }
.reg-aside-feats .ico { color: #aef0ff; flex: 0 0 auto; }
.reg-aside-foot { font-size: 12px; opacity: .72; margin-top: 26px; position: relative; }

.reg-main { flex: 1 1 auto; min-width: 0; padding: 32px 34px 24px; display: flex; flex-direction: column; }

/* 吉祥物在深色侧栏内：提示文字改为浅色，避免看不清 */
.reg-aside .mascot .mascot-tip { color: rgba(255,255,255,.92); }
.reg-aside .mascot.peek .mascot-tip { color: #ffe08a; }

/* 桌面端由左侧品牌栏承载品牌信息，主区不再重复大标题 */
@media (min-width: 860px) { .reg-main > .reg-brand { display: none; } }
/* 移动端：侧栏收起为紧凑顶栏，吉祥物与卖点隐藏，避免冗长 */
@media (max-width: 859px) {
    .reg-shell { flex-direction: column; max-width: 480px; }
    .reg-aside { flex: none; padding: 22px 22px 18px; }
    .reg-aside-mascot, .reg-aside-feats, .reg-aside-foot { display: none; }
    .reg-aside-title { font-size: 18px; margin: 8px 0 0; }
    .reg-main { padding: 24px 22px 20px; }
}

.reg-brand { display: none; text-align: center; margin-bottom: 22px; }
.reg-brand img { width: 52px; height: 52px; object-fit: contain; border-radius: 13px; margin-bottom: 12px; }
.reg-brand h1 { font-size: 21px; margin: 0 0 6px; color: var(--text-1); }
.reg-brand p { margin: 0; font-size: 13.2px; color: var(--text-3); }

.reg-progress { display: flex; align-items: center; margin: 0 6px 26px; }
.reg-progress .dot { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.reg-progress .dot span {
    width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--surface-2); border: 2px solid var(--border-strong); color: var(--text-3);
    font-size: 13px; font-weight: 700; transition: all .32s cubic-bezier(.34,1.4,.5,1);
}
.reg-progress .dot em { font-style: normal; font-size: 11.5px; color: var(--text-3); transition: var(--transition); }
.reg-progress .dot.current span { background: var(--brand); border-color: var(--brand); color: #fff; transform: scale(1.12); box-shadow: 0 6px 16px var(--brand-glow); }
.reg-progress .dot.current em { color: var(--brand); font-weight: 600; }
.reg-progress .dot.done span { background: var(--success); border-color: var(--success); color: #fff; }
.reg-progress .dot.done em { color: var(--success); }
.reg-progress .line { flex: 1; height: 2px; background: var(--border); margin: 0 8px 22px; position: relative; overflow: hidden; border-radius: 2px; }
.reg-progress .line.done { background: var(--success); }

.reg-scroll { min-height: 300px; position: relative; }
.reg-step { display: none; animation: czxFadeUp .42s cubic-bezier(.22,.8,.3,1) both; }
.reg-step.active { display: block; }
/* 单页平铺模式：后台关闭「分步注册」时，步骤 1/2 同时可见，隐藏进度条与「上一步」；
   步骤 3（完成页）仍只在提交成功后由 JS 显示 */
.reg-shell.single .reg-progress { display: none; }
.reg-shell.single .reg-step { display: block; margin-bottom: 26px; }
.reg-shell.single .reg-step[data-step="3"]:not(.active) { display: none; }
.reg-shell.single #backBtn { display: none; }
.step-title { font-size: 17px; margin: 0 0 5px; color: var(--text-1); }
.step-sub { font-size: 13px; color: var(--text-3); margin: 0 0 20px; }

.ch-tabs { display: flex; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 4px; margin-bottom: 20px; }
.ch-tab {
    flex: 1; border: none; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer;
    font-size: 13.5px; color: var(--text-2); font-family: inherit; display: flex; align-items: center;
    justify-content: center; gap: 6px; transition: var(--transition);
}
.ch-tab.active { background: var(--surface); color: var(--brand); font-weight: 600; box-shadow: var(--shadow-xs); }

/* OTP 验证码输入 */
.otp-wrap { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .45s cubic-bezier(.22,.8,.3,1), opacity .35s; }
.otp-wrap.show { max-height: 190px; opacity: 1; }
.otp { display: flex; gap: 8px; justify-content: space-between; margin-bottom: 10px; }
.otp-cell {
    flex: 1; min-width: 0; height: 52px; text-align: center; font-size: 22px; font-weight: 700;
    color: var(--text-1); border: 1.6px solid var(--border-strong); border-radius: 11px;
    background: var(--surface); outline: none; transition: all .18s var(--transition);
    font-family: ui-monospace, Menlo, Consolas, monospace; padding: 0;
}
.otp-cell:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.otp-cell.filled { border-color: var(--brand); background: #fbfdff; }
.otp-cell.error { border-color: var(--danger); animation: czxShake .42s; }

.otp-state { font-size: 12.8px; min-height: 20px; display: flex; align-items: center; gap: 7px; }
.otp-state.loading { color: var(--text-3); }
.otp-state.ok { color: var(--success); font-weight: 600; }
.otp-state.error { color: var(--danger); }
.spinner {
    width: 13px; height: 13px; border: 2px solid var(--border-strong); border-top-color: var(--brand);
    border-radius: 50%; display: inline-block; animation: czxSpin .7s linear infinite;
}

/* 勾选成功动画 */
.check-svg { width: 20px; height: 20px; }
.check-svg.big { width: 74px; height: 74px; }
.check-svg .check-circle { stroke: var(--success); stroke-width: 3.4; stroke-dasharray: 160; stroke-dashoffset: 160; animation: czxDash .5s ease-out forwards; }
.check-svg .check-path { stroke: var(--success); stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: czxDash .34s .42s ease-out forwards; }

.success-flash {
    position: absolute; inset: 0; border-radius: 20px; pointer-events: none; z-index: 5;
    background: radial-gradient(circle at 50% 40%, rgba(23,166,115,.20), transparent 62%);
    animation: czxFadeIn .16s ease-out reverse;
}

/* 获取验证码按钮 */
.btn-code {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; cursor: pointer;
    border: 1px solid var(--brand); color: var(--brand); background: var(--brand-light);
    border-radius: 8px; font-size: 12.8px; font-family: inherit; font-weight: 500;
    transition: var(--transition); white-space: nowrap;
}
.btn-code:hover:not(:disabled) { background: var(--brand); color: #fff; }
.btn-code:disabled { opacity: .6; cursor: not-allowed; border-color: var(--border-strong); background: var(--surface-2); color: var(--text-3); }

/* 小人动画 */
.mascot { display: flex; flex-direction: column; align-items: center; margin: -4px 0 16px; }
.mascot-svg { width: 128px; height: 116px; }
.mascot .hand { transition: transform .44s cubic-bezier(.34,1.5,.5,1); }
.mascot .hand-l { transform-origin: 46px 56px; }
.mascot .hand-r { transform-origin: 84px 56px; }
.mascot .eyes .eye { transform-origin: center; transition: transform .3s var(--transition); }
.mascot.peek .hand-l { transform: translate(-13px, 15px) rotate(-22deg); }
.mascot.peek .hand-r { transform: translate(13px, 15px) rotate(22deg); }
.mascot.peek .eyes .eye { transform: scale(1.22); }
.mascot.peek .mouth { d: path("M56 68 q9 10 18 0"); }
.mascot .mascot-tip { font-size: 12.4px; color: var(--text-3); margin-top: 6px; transition: var(--transition); }
.mascot.peek .mascot-tip { color: var(--brand); }

.verified-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 30px;
    background: var(--success-bg); color: var(--success); font-size: 12.8px; margin-bottom: 18px; font-weight: 500;
}
.verified-badge em { font-style: normal; font-size: 11.5px; opacity: .8; }
.verified-badge span { font-weight: 600; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 密码强度 */
.pwd-meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pwd-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--border); position: relative; overflow: hidden; }
.pwd-bar::after { content: ''; position: absolute; inset: 0; width: 0; border-radius: 3px; transition: width .3s var(--transition), background .3s; }
.pwd-bar.lv1::after { width: 25%; background: #ef4444; }
.pwd-bar.lv2::after { width: 50%; background: #f59e0b; }
.pwd-bar.lv3::after { width: 75%; background: #3b82f6; }
.pwd-bar.lv4::after { width: 100%; background: #17a673; }
.pwd-txt { font-size: 12px; color: var(--text-3); min-width: 66px; text-align: right; }

/* 完成页 */
.reg-done { text-align: center; padding: 18px 0 8px; }
.done-ring {
    width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 50%;
    background: var(--success-bg); display: flex; align-items: center; justify-content: center;
    animation: czxPulse 1.8s ease-out 1;
}
.reg-done h2 { margin: 0 0 8px; font-size: 21px; color: var(--text-1); }
.reg-done p { margin: 0 0 18px; font-size: 13.5px; color: var(--text-2); }
.done-bar { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 0 auto 20px; max-width: 240px; }
.done-bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; animation: czxBar 1.7s linear forwards; }

/* 彩带 */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9; overflow: hidden; }
.confetti i {
    position: absolute; top: -14px; width: 8px; height: 14px; border-radius: 2px;
    animation-name: czxFall; animation-timing-function: cubic-bezier(.3,.6,.6,1); animation-fill-mode: forwards;
}

/* ==========================================================
   验证码组件
   ========================================================== */
.captcha-slot { min-height: 44px; }
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-input { flex: 1 1 auto; min-width: 0; }
.captcha-input .form-control { height: 46px; letter-spacing: 2px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.captcha-img-box {
    flex: 0 0 auto; width: 132px; border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; cursor: pointer; background: var(--surface-2); display: flex;
    align-items: center; justify-content: center; transition: var(--transition);
}
.captcha-img-box:hover { border-color: var(--brand); }
.captcha-img { width: 100%; height: 46px; object-fit: cover; display: block; }
.geetest-box { min-height: 44px; }

/* 注册页背景装饰 */
.auth-float {
    position: absolute; border-radius: 50%; filter: blur(28px); opacity: .5; z-index: 1;
    background: radial-gradient(circle, rgba(23,99,245,.4), transparent 70%);
    animation: czxFloat 7s ease-in-out infinite;
}
.auth-float.f1 { width: 190px; height: 190px; left: 8%; top: 14%; }
.auth-float.f2 { width: 150px; height: 150px; right: 10%; bottom: 12%; animation-delay: 1.6s; }

/* ==========================================================
   响应式增强
   ========================================================== */
@media (max-width: 1024px) {
    .stat-strip { grid-template-columns: repeat(3, 1fr); }
}

/* 手机端导航：品牌靠左，操作区（含汉堡键）整体贴右，避免挤在中间 */
@media (max-width: 820px) {
    .nav-main { display: none !important; }
    .nav-toggle { display: inline-flex; }
    .site-header .nav-actions .btn span.txt-opt { display: none; }
    .site-header .container { gap: 10px; }
    .site-header .brand { flex: 0 1 auto; min-width: 0; margin-right: auto; }
    .site-header .nav-actions { margin-left: auto; gap: 6px; flex: 0 0 auto; }
    .site-header .nav-actions .btn { padding: 8px 10px; }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .docs-layout { grid-template-columns: 1fr; }
    .grid-auto { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
    .site-header .container { gap: 10px; }
    .brand span .brand-sub { display: none; }
    .brand span { font-size: 15px; }
    .brand img { width: 32px; height: 32px; }
    .nav-actions .btn { padding: 8px 11px; }
    .page-head h1 { font-size: 19px !important; }
    .filter-item { flex: 1 1 100%; min-width: 0; }
    .filter-submit { flex: 1 1 100%; }
    .filter-submit .btn { flex: 1; justify-content: center; }
    .table { min-width: 560px; }
    .modal { width: calc(100vw - 24px) !important; max-height: 90vh; border-radius: 16px; }
    .modal.modal-lg { width: calc(100vw - 24px) !important; }
    .modal-body { padding: 16px; }
    .modal-foot { padding: 12px 16px; }
    .pager { flex-direction: column; align-items: center; gap: 10px; }
    .btn-row { flex-wrap: wrap; }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .docs-nav { overflow-x: auto; flex-wrap: nowrap; }
    .docs-nav a { flex: 0 0 auto; }
    .sdk-grid { grid-template-columns: 1fr !important; }
    .topbar h2 { font-size: 15px; }
    .user-menu .uname { display: none; }
    .reg-shell { border-radius: 16px; }
    .reg-brand h1 { font-size: 19px; }
    .otp { gap: 6px; }
    .otp-cell { height: 46px; font-size: 19px; border-radius: 9px; }
    .captcha-img-box { width: 112px; }
    .card-body { padding: 15px; }
    .content { padding: 16px 14px 40px; }
    .page-head { gap: 10px; }
    .page-head .btn { padding: 9px 14px; }
}

@media (max-width: 400px) {
    .reg-progress .dot em { display: none; }
    .stat-strip { grid-template-columns: 1fr; }
    .otp-cell { height: 42px; font-size: 17px; }
    .captcha-row { flex-direction: column; }
    .captcha-img-box { width: 100%; }
}

/* 应用分组标题 */
.app-group-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.app-group-head .ag-icon {
    width: 34px; height: 34px; border-radius: 10px; background: var(--brand-light); color: var(--brand);
    display: flex; align-items: center; justify-content: center; font-size: 17px; flex: 0 0 auto;
}
.app-group-head h2 { margin: 0; font-size: 16px; color: var(--text-1); }
.app-group-head .ag-count { font-size: 12.5px; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border); padding: 2px 9px; border-radius: 20px; }

/* ==========================================================
   显示修正 & 移动端修复补丁
   （集中放在文件末尾，确保优先级最高，避免被前文重复定义覆盖）
   ========================================================== */

/* 首页 hero 内的代码块恢复浅色配色
   （文档页的深色 .code-block 与本处同优先级且位置更后，会误伤首页） */
.hero-panel .code-block {
    background: #fbfcfe;
    color: #2c3b57;
    border: 1px solid var(--border);
}
.hero-panel .code-block .c-key { color: #1763f5; }
.hero-panel .code-block .c-str { color: #0d8a5f; }
.hero-panel .code-block .c-com { color: #8b97ae; }
.hero-panel .code-block .c-fn  { color: #a350d0; }
.hero-panel .code-block .c-num { color: #c26a1a; }

/* 全局 Loading 遮罩的大号 spinner（原 .spinner-lg 被后文的 .spinner 覆盖成 13px） */
.spinner.spinner-lg {
    width: 34px;
    height: 34px;
    border-width: 3px;
    color: var(--brand);
    margin: 0;
}

/* 统一徽章危险色（后文硬编码值会覆盖变量版，此处统一回变量） */
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* 开发者设置页「我的应用」区块（原先缺少样式定义，布局退化为块级堆叠） */
.app-key-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.app-key-name { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-1); }
.text-xs { font-size: 11.5px; }

/* ----------------------------------------------------------
   移动端：输入框字号 >= 16px
   iOS Safari 在聚焦 font-size < 16px 的输入框时会强制放大整个页面，
   这是手机端「布局突然变大、错位」最常见的原因。
   ---------------------------------------------------------- */
@media (max-width: 820px) {
    .form-control,
    input[type="text"], input[type="email"], input[type="password"],
    input[type="number"], input[type="tel"], input[type="search"],
    input[type="date"], input[type="datetime-local"],
    select, textarea {
        font-size: 16px;
    }
    .form-control-lg { font-size: 16px; }
}

/* ----------------------------------------------------------
   移动端：柱状图 / 筛选栏防横向溢出
   .bar-col 是 flex 子项，默认 min-width:auto 无法收缩，
   配合 .bar-label 的 white-space:nowrap，14~30 根柱子会把卡片撑破。
   ---------------------------------------------------------- */
@media (max-width: 820px) {
    .bar-chart { overflow-x: auto; padding-bottom: 4px; }
    .bar-chart .bar-col { min-width: 0; }
    .filter-item { min-width: 0; flex: 1 1 45%; }
    .filter-submit { flex: 1 1 100%; }
}

/* ----------------------------------------------------------
   移动端：卡片头 / 键值行 / 表格 / 触控热区 / 安全区
   ---------------------------------------------------------- */
@media (max-width: 640px) {
    /* 卡片标题与右侧按钮/徽章换行，避免相互挤压 */
    .card-head { flex-wrap: wrap; gap: 8px; padding: 13px 15px; }

    /* 键值行左侧标签收窄，给值留出空间 */
    .kv-item .k { width: 88px; }

    /* 表格：缩小最小宽度与内边距，减少横向滚动幅度 */
    .table { min-width: 480px; }
    .table th, .table td { padding: 9px 10px; font-size: 12.5px; }

    /* 操作按钮热区 >= 38px，间距加大，避免误触 */
    .td-actions { gap: 8px; }
    .btn-icon, .btn-icon.btn-sm { width: 38px; height: 38px; }
    .btn-sm { padding: 9px 13px; font-size: 13.5px; }
    .pager li a { min-width: 40px; height: 40px; }
    .copy-cell button, .input-icon .suffix, .modal-close { padding: 9px; }

    /* 柱状图 */
    .bar-chart { gap: 4px; height: 132px; }
    .bar-chart .bar { max-width: 20px; }
    .bar-chart .bar-label { font-size: 9.5px; }

    /* 代码块 */
    .code-block { font-size: 11.6px; padding: 12px 13px; }

    /* 标签条可横滑但滚动条被隐藏，加右侧渐隐提示“还有内容” */
    .tabs {
        padding-right: 26px;
        -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
        mask-image: linear-gradient(90deg, #000 88%, transparent);
    }

    /* iPhone 安全区（刘海 / 底部横条） */
    #toast-box, .toast { top: calc(20px + env(safe-area-inset-top)); }
    .modal-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    .modal { max-height: calc(92vh - env(safe-area-inset-bottom)); }
    .sidebar, .nav-drawer, .auth-wrap { padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 400px) {
    .table { min-width: 430px; }
    .kv-item .k { width: 76px; }
    .otp-cell { height: 42px; font-size: 17px; }
}

/* ----------------------------------------------------------
   主内容 + 侧栏 两栏布局类
   原先这几个页面的 grid-template-columns 直接写在行内 style 上，
   行内样式优先级高于媒体查询，导致手机上依然是两栏、内容被挤扁。
   ---------------------------------------------------------- */
.grid-aside { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 820px) {
    .grid-aside { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   移动端顶部导航最终修正
   现象：手机端 .nav-main 隐藏后，.container 内只剩 brand + nav-actions，
   由于没有分配剩余空间，两者会挤在中间；汉堡键与登录/退出按钮位置错乱。
   修正：brand 贴左（自动吃掉剩余空间），操作区贴右，汉堡键排在最右。
   ---------------------------------------------------------- */
@media (max-width: 820px) {
    .site-header .container {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
    }
    .site-header .brand { margin-right: auto; min-width: 0; overflow: hidden; }
    .site-header .brand > span {
        display: block; min-width: 0; overflow: hidden;
        text-overflow: ellipsis; white-space: nowrap;
    }
    .site-header .nav-actions { margin-left: auto; gap: 6px; flex: 0 0 auto; }
    .site-header .nav-actions .btn {
        width: 36px; height: 36px; padding: 0; justify-content: center;
    }
    .site-header .nav-actions .nav-toggle { order: 9; flex: 0 0 auto; }
}

@media (max-width: 480px) {
    /* 窄屏只保留 Logo + 主操作 + 汉堡键，避免文字与按钮拥挤 */
    .site-header .brand > span { display: none; }
}

/* 控制台顶栏：菜单键贴左、标题居中、右侧操作区贴右（防挤在一起） */
@media (max-width: 820px) {
    .topbar { gap: 10px; padding: 0 14px; }
    .topbar .menu-toggle {
        order: 0; width: 38px; height: 38px; display: flex;
        align-items: center; justify-content: center; flex: 0 0 auto;
    }
    .topbar h2 { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar .tb-actions { margin-left: auto; flex: 0 0 auto; }
}

/* ==========================================================
   注册向导 2.0：子视图过渡 / OTP 合并动画 / 机器人吉祥物
   ========================================================== */

/* 步骤 1 的两个子视图：填写账号 <-> 验证码界面（滑动过渡） */
.rgx-view { display: none; }
.rgx-view.active {
    display: block;
    animation: rgxSlideIn .46s cubic-bezier(.22,.9,.28,1) both;
}
.rgx-view.exit-left { animation: rgxSlideOutL .32s ease both; }
.rgx-view.exit-right { animation: rgxSlideOutR .32s ease both; }
@keyframes rgxSlideIn  { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes rgxSlideOutL { to { opacity: 0; transform: translateX(-34px); } }
@keyframes rgxSlideOutR { to { opacity: 0; transform: translateX(34px); } }

.rgx-code-head { text-align: center; margin: 2px 0 18px; }
.rgx-code-title { font-size: 17px; font-weight: 700; color: var(--text-1); }
.rgx-code-sub { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.rgx-code-sub b { color: var(--text-1); font-weight: 600; }
.rgx-link {
    background: none; border: none; padding: 2px 4px; cursor: pointer;
    color: var(--brand); font-size: 12.8px; font-weight: 600; font-family: inherit;
}
.rgx-link:hover:not(:disabled) { text-decoration: underline; }
.rgx-link:disabled { color: var(--text-3); cursor: not-allowed; }
.rgx-resend {
    text-align: center; margin-top: 14px; font-size: 12.8px; color: var(--text-3);
    display: flex; align-items: center; justify-content: center; gap: 4px;
}

/* 大号主按钮（注册页获取验证码 / 下一步） */
.btn-lg { height: 48px; font-size: 15.5px; border-radius: 13px; }
.btn-lg:active { transform: scale(.985); }

/* ---------- OTP：合拢 / 校验中 / 成功 / 失败 ---------- */
.otp { --cell-gap: 8px; gap: var(--cell-gap); position: relative; }
.otp-cell { transition: transform .45s cubic-bezier(.34,1.4,.5,1), border-color .25s, background .25s, box-shadow .25s, opacity .3s; }
.otp-cell.filled { animation: cellPop .3s cubic-bezier(.34,1.56,.64,1); }
@media (max-width: 640px) { .otp { --cell-gap: 6px; } }

/* 合拢：6 格向中心收拢、缩小、淡出，中央结果圆浮现（带左→右错落，更流畅） */
.otp.merging .otp-cell {
    transform: translateX(calc((2.5 - var(--i)) * (100% + var(--cell-gap)))) scale(.9);
    opacity: .25; pointer-events: none;
    transition-delay: calc(var(--i) * 32ms);
}
.otp.merged .otp-cell,
.otp.merged-ok .otp-cell,
.otp.spread-err .otp-cell { opacity: 0; transform: scale(.55); pointer-events: none; }

/* 中央结果圆（校验中 / 成功 / 失败 三态共用） */
.otp-merged {
    position: absolute; left: 50%; top: 50%;
    width: 58px; height: 58px; border-radius: 50%;
    transform: translate(-50%, -50%) scale(.2); opacity: 0; pointer-events: none;
    background: var(--surface); border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    transition: transform .4s cubic-bezier(.3,1.5,.4,1), opacity .25s, background .35s, border-color .35s, box-shadow .35s;
    z-index: 3; box-shadow: var(--shadow-md);
}
.otp.merged .otp-merged { transform: translate(-50%, -50%) scale(1); opacity: 1; animation: mBreath 1.5s ease-in-out infinite, omGlow 1.6s ease-in-out infinite; }
.otp-merged svg { position: absolute; width: 30px; height: 30px; }
.om-loader { display: block; }
.om-check, .om-cross { display: none; }
.om-loader-track { fill: none; stroke: var(--border); stroke-width: 4; }
.om-loader-arc { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 90 220; transform-origin: 50% 50%; animation: omSpin 1s linear infinite; }
@keyframes omSpin { to { transform: rotate(360deg); } }
/* 校验中：柔和呼吸光圈（参考开源 OTP 的 verifying glow） */
@keyframes omGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79,139,255,0), 0 10px 24px rgba(79,139,255,.30); }
    50%      { box-shadow: 0 0 0 11px rgba(79,139,255,.10), 0 12px 32px rgba(79,139,255,.46); }
}

/* 成功：绿底 + 对勾描边 + 涟漪 + 轻快回弹 */
.otp.merged-ok .otp-merged {
    background: var(--success); border-color: var(--success);
    box-shadow: 0 12px 28px rgba(22,166,115,.35);
    transform: translate(-50%, -50%) scale(1); opacity: 1;
    animation: omPop .55s cubic-bezier(.34,1.56,.64,1);
}
.otp.merged-ok .om-loader { display: none; }
.otp.merged-ok .om-check { display: block; }
.otp.merged-ok .om-check-circle { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 3; }
.otp.merged-ok .om-check-path {
    fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 44; stroke-dashoffset: 44; animation: omDraw .45s .06s cubic-bezier(.3,1,.4,1) forwards;
}
.otp-merged::before, .otp-merged::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid var(--success); opacity: 0; pointer-events: none;
}
.otp.merged-ok .otp-merged::before { animation: omRipple .75s ease-out; }
.otp.merged-ok .otp-merged::after  { animation: omRipple .75s .12s ease-out; }
@keyframes omPop { 0% { transform: translate(-50%,-50%) scale(.2); } 60% { transform: translate(-50%,-50%) scale(1.16); } 100% { transform: translate(-50%,-50%) scale(1); } }
@keyframes omDraw { to { stroke-dashoffset: 0; } }
@keyframes omRipple { 0% { opacity: .65; transform: scale(1); } 100% { opacity: 0; transform: scale(2.3); } }

/* 成功：高光扫过（参考 Toss OTP 的 spring + shine） */
.otp-merged .om-shine { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; }
.otp-merged .om-shine::after {
    content: ''; position: absolute; top: -40%; left: -70%; width: 55%; height: 180%;
    background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.92) 50%, transparent 80%);
    transform: translateX(-160%) rotate(18deg); opacity: 0;
}
.otp.merged-ok .otp-merged .om-shine::after { animation: omShine .75s .18s ease; }
@keyframes omShine {
    0%   { opacity: 0; transform: translateX(-160%) rotate(18deg); }
    25%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(280%) rotate(18deg); }
}

/* 失败：红底 + 叉号描边 + 柔和抖动 */
.otp.spread-err .otp-merged {
    background: var(--danger); border-color: var(--danger);
    box-shadow: 0 12px 28px rgba(220,38,38,.3);
    transform: translate(-50%, -50%) scale(1); opacity: 1;
    animation: omErrShake .5s cubic-bezier(.36,.07,.19,.97);
}
.otp.spread-err .om-loader { display: none; }
.otp.spread-err .om-cross { display: block; }
.otp.spread-err .om-cross-circle { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 3; }
.otp.spread-err .om-cross-path {
    fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round;
    stroke-dasharray: 52; stroke-dashoffset: 52; animation: omDraw .4s .06s ease forwards;
}
.otp.spread-err .otp-merged::before, .otp.spread-err .otp-merged::after { border-color: var(--danger); }
.otp.spread-err .otp-merged::before { animation: omRipple .7s ease-out; }
@keyframes omErrShake {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0); }
    20% { transform: translate(calc(-50% - 6px), -50%) rotate(-3deg); }
    40% { transform: translate(calc(-50% + 6px), -50%) rotate(3deg); }
    60% { transform: translate(calc(-50% - 4px), -50%) rotate(-2deg); }
    80% { transform: translate(calc(-50% + 2px), -50%) rotate(1deg); }
}

/* 成功时轻柔迸发的光点 */
.otp-spark {
    position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, var(--success) 70%);
    box-shadow: 0 0 7px rgba(22,166,115,.7); pointer-events: none; z-index: 5; opacity: 0;
    animation: otpSpark 1s ease-out forwards;
}
@keyframes otpSpark {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--tx, -50%), var(--ty, -50%)) translateY(-12px) scale(.65); }
}

/* ---------- 机器人吉祥物 ---------- */
.mascot { will-change: transform; }
.mascot .m-body { animation: mFloat 3.2s ease-in-out infinite; transform-origin: 65px 90px; }
.mascot .m-ant { animation: mAntPulse 1.8s ease-in-out infinite; transform-origin: 65px 11px; }
.mascot .m-eye { animation: mBlink 4.2s infinite; transform-origin: center; transform-box: fill-box; }
.mascot .m-eyes-happy { opacity: 0; }
.mascot .hand { transition: transform .44s cubic-bezier(.34,1.5,.5,1); }
.mascot .hand-l { transform-origin: 26px 61px; }
.mascot .hand-r { transform-origin: 104px 61px; }
.mascot.peek .hand-l { transform: translate(32px, -8px) rotate(-24deg); }
.mascot.peek .hand-r { transform: translate(-32px, -8px) rotate(24deg); }
.mascot.peek .m-mouth { d: path("M58 66 q7 8 14 0"); }

@keyframes mFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
@keyframes mAntPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.82); }
}
@keyframes mBlink {
    0%, 92%, 100% { transform: scaleY(1); }
    95%, 97% { transform: scaleY(.08); }
}

/* 验证成功：眯眯眼 + 弹跳 */
.mascot.ok .m-eyes { opacity: 0; }
.mascot.ok .m-eyes-happy { opacity: 1; }
.mascot.ok .m-body { animation: mCheer .7s cubic-bezier(.3,1.6,.4,1) 2; }
.mascot.ok .m-ant { background: var(--success); animation: none; }
@keyframes mCheer {
    0%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-12px) scale(1.05); }
    70% { transform: translateY(0) scale(.98, .92); }
}
/* 验证失败：歪头 + 天线变红 + 眼睛眯成线 */
.mascot.err .m-body { animation: mSad .9s ease both; }
.mascot.err .m-ant { fill: var(--danger); animation: none; }
.mascot.err .m-eye { animation: none; transform: scaleY(.3); }
.mascot.err .m-mouth { d: path("M58 70 q6 -5 12 0"); }
@keyframes mSad {
    0% { transform: rotate(0); }
    30% { transform: rotate(-7deg) translateY(2px); }
    60% { transform: rotate(5deg); }
    100% { transform: rotate(-4deg) translateY(2px); }
}

/* ==========================================================
   工单会话式详情（用户端 + 管理端共用）
   ========================================================== */
.tk-modal { display: flex; flex-direction: column; max-height: 86vh; }
.tk-body { overflow: hidden; display: flex; flex-direction: column; flex: 1; min-height: 220px; padding: 14px 18px; }
.tk-meta { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); margin-bottom: 12px; flex-wrap: wrap; }
.tk-meta-item { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-3); }
.tk-chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; min-height: 180px; max-height: 46vh; }
.tk-loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); font-size: 13px; height: 120px; }

.tk-msg { display: flex; gap: 10px; max-width: 86%; }
.tk-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.tk-avatar {
    width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, var(--brand), #4f8cff);
}
.tk-msg.admin .tk-avatar { background: linear-gradient(135deg, #22c55e, #4ade80); }
.tk-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tk-msg.mine .tk-col { align-items: flex-end; }
.tk-who { font-size: 11.5px; color: var(--text-3); display: flex; gap: 8px; align-items: baseline; }
.tk-who time { font-size: 10.5px; color: var(--text-3); opacity: .8; }
.tk-bubble {
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 9px 13px; border-radius: 4px 14px 14px 14px;
    font-size: 13.5px; line-height: 1.75; word-break: break-word;
    animation: tkPop .28s cubic-bezier(.3,1.3,.4,1) both;
}
.tk-msg.mine .tk-bubble {
    background: var(--brand-light); border-color: #cfe0ff;
    border-radius: 14px 4px 14px 14px;
}
@keyframes tkPop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

.tk-foot { flex-direction: column; gap: 10px; align-items: stretch; padding-top: 12px; }
.tk-composer { display: flex; gap: 10px; align-items: flex-end; }
.tk-composer textarea { flex: 1; resize: none; min-height: 44px; }
.tk-composer .btn { flex: 0 0 auto; }
.tk-foot-bar { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 工单服务评分 ---------- */
.tk-chat { max-height: 40vh; }
.tk-rate {
    flex: 0 0 auto; margin-top: 14px; padding-top: 14px;
    border-top: 1px dashed var(--border);
}
.tk-rate-label { font-size: 13.5px; font-weight: 600; color: var(--text-1); margin-bottom: 8px; }
.tk-stars { display: inline-flex; align-items: center; gap: 3px; }
.tk-stars .ico { color: var(--border-strong); flex: 0 0 auto; }
.tk-stars .ico.on { color: #f5a623; }
.tk-star-i { color: var(--border-strong); flex: 0 0 auto; }
.tk-star-i.on { color: #f5a623; }
.tk-star {
    background: none; border: none; padding: 2px; cursor: pointer;
    display: inline-flex; color: var(--border-strong); border-radius: 6px;
    transition: transform .14s ease, color .14s ease;
}
.tk-star .ico { pointer-events: none; }
/* 实心切换：默认显示描边层，选中/悬停显示实心层 */
.tk-star .st-f { display: none; }
.tk-star.on .st-o, .tk-star.hover .st-o { display: none; }
.tk-star.on .st-f, .tk-star.hover .st-f { display: inline; }
.tk-star:hover { transform: scale(1.16); }
.tk-star.on, .tk-star.hover { color: #f5a623; }
.tk-rate-tip { margin-left: 10px; font-size: 12.5px; color: var(--brand); font-weight: 600; }
.tk-rate-comment {
    margin-top: 8px; font-size: 13px; color: var(--text-2); line-height: 1.7;
    background: var(--surface-2); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap;
}
.tk-rate-form textarea { resize: none; }

/* 列表里的评分 */
.row-rate { display: flex; align-items: center; gap: 2px; margin-top: 4px; }
.row-rate.pending { font-size: 11.5px; color: var(--brand); }

/* 管理端评分看板 */
.tk-score-board {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 10px 16px; box-shadow: var(--shadow-sm);
}
.tk-score-num { font-size: 26px; font-weight: 700; color: #f5a623; line-height: 1; }
.tk-score-side { display: flex; flex-direction: column; gap: 2px; }
.tk-score-tip { font-size: 11.5px; color: var(--text-3); }

@media (max-width: 640px) {
    .tk-msg { max-width: 94%; }
    .tk-chat { max-height: 34vh; }
}

/* ==================== 工单看板（看板式） ==================== */
.tkb-board {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start;
}
.tkb-col {
    background: var(--bg-soft, #f6f8fc); border: 1px solid var(--border);
    border-radius: 14px; display: flex; flex-direction: column; min-height: 200px;
}
.tkb-col-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.tkb-col-head b { font-size: 15px; color: var(--text-1); }
.tkb-col-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.tkb-empty { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 22px 0; }
.tkb-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
    padding: 11px 13px; text-decoration: none; color: inherit; display: block;
    box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tkb-card:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 6px 16px rgba(23,99,245,.12); }
.tkb-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tkb-card-title { font-size: 13.5px; font-weight: 600; color: var(--text-1); margin-bottom: 6px; line-height: 1.4; }
.tkb-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.tkb-card-time { margin-top: 8px; font-size: 11.5px; color: var(--text-3); }

@media (max-width: 1024px) { .tkb-board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .tkb-board { grid-template-columns: 1fr; } }

/* 通知点（顶栏） */
.tb-bell { position: relative; }
.tb-bell .dot {
    position: absolute; top: 4px; right: 4px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--danger); border: 2px solid var(--surface);
}

/* ==========================================================
   开发者中心 & 店铺页
   ========================================================== */
.dev-benefits { display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.dev-benefit { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); }
.dev-benefit svg { color: var(--success); flex: 0 0 auto; }

.dev-apply-wait { text-align: center; padding: 40px 24px; }
.dev-wait-icon {
    width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px;
    background: var(--brand-light); color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    animation: mFloat 3s ease-in-out infinite;
}
.dev-apply-wait h3 { margin: 0 0 8px; font-size: 17px; }
.dev-apply-wait p { margin: 0 auto 18px; max-width: 420px; font-size: 13.5px; color: var(--text-2); line-height: 1.8; }
.dev-apply-snap { max-width: 440px; margin: 0 auto; text-align: left; background: var(--surface-2); border-radius: 12px; padding: 6px 14px; }

.dev-shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dev-shop-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dev-shop-icon {
    width: 46px; height: 46px; border-radius: 13px; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--brand), #4f8cff); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.dev-shop-url { font-size: 12.5px; color: var(--text-3); margin-top: 3px; word-break: break-all; }
.app-key-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.app-key-row .k { width: 90px; color: var(--text-3); font-size: 12px; flex: 0 0 auto; }
.app-key-row code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 3px 9px; }

.store-avatar {
    width: 58px; height: 58px; border-radius: 18px; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--brand), #4f8cff); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700;
    box-shadow: 0 10px 26px var(--brand-glow);
}
.clamp-3 {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.6;
}
@media (max-width: 640px) {
    .dev-shop-bar { flex-direction: column; align-items: stretch; }
    .dev-shop-bar .btn-row { justify-content: flex-end; }
}

/* ==========================================================
   首页动效增强
   ========================================================== */

/* 源码框：逐行打字机 + 光标 */
.code-block.typewriter .cl {
    display: block; min-height: 1.55em; white-space: pre;
    overflow: hidden; width: 0;
    animation: twType .38s steps(24, end) forwards;
    animation-delay: calc(var(--d) * .55s);
    border-right: none;
}
@keyframes twType { to { width: 100%; } }
/* 光标：跟在最后一行后闪烁，打完消失 */
.code-block.typewriter .cl:last-child { position: relative; }
.code-block.typewriter.typing .cl:last-child::after {
    content: ''; display: inline-block; width: 8px; height: 1.1em;
    background: var(--brand); vertical-align: text-bottom; margin-left: 2px;
    animation: twCaret .8s steps(1) infinite;
}
@keyframes twCaret { 50% { opacity: 0; } }
.code-block.typewriter.done .cl { border-right: none; }

/* 验证状态条（源码框底部） */
.hp-status {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-top: 1px solid var(--border);
    font-size: 12.5px; color: var(--text-3); background: #f7fafe;
    border-radius: 0 0 var(--radius-lg, 16px) var(--radius-lg, 16px);
    opacity: 0; transform: translateY(6px);
    transition: opacity .4s, transform .4s;
}
.hp-status.show { opacity: 1; transform: none; }
.hp-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #f59e0b;
    animation: hpPulse 1s ease-in-out infinite; flex: 0 0 auto;
}
.hp-status.ok .hp-dot { background: var(--success); animation: none; }
.hp-status.ok { color: var(--success); font-weight: 600; }
@keyframes hpPulse { 50% { opacity: .35; } }

/* Hero 光斑增强：缓慢漂移 + 呼吸 */
.hero-deco { animation: decoDrift 14s ease-in-out infinite alternate; }
.hero-deco.b { animation-duration: 18s; animation-delay: -6s; }
@keyframes decoDrift {
    0% { transform: translate(0, 0) scale(1); opacity: .85; }
    50% { opacity: 1; }
    100% { transform: translate(36px, -26px) scale(1.12); opacity: .8; }
}

/* 卡片悬浮微交互 */
.feature { transition: transform .35s cubic-bezier(.22,.9,.3,1), box-shadow .35s, border-color .35s; }
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feature:hover .f-icon { transform: scale(1.08) rotate(-4deg); }
.feature .f-icon { transition: transform .35s cubic-bezier(.3,1.4,.4,1); }
.plan { transition: transform .35s cubic-bezier(.22,.9,.3,1), box-shadow .35s; }
.plan:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.plan.featured:hover { transform: translateY(-8px) scale(1.015); }

/* 数字滚动位 */
.hero-stat .v { font-variant-numeric: tabular-nums; }

/* 尊重减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
    .code-block.typewriter .cl { animation: none; width: 100%; }
    .code-block.typewriter.typing .cl:last-child::after { display: none; }
    .hero-deco, .mascot .m-body, .mascot .m-eye, .mascot .m-ant { animation: none !important; }
    .hp-status { transition: none; opacity: 1; transform: none; }
}

/* ==========================================================
   通用弹窗组件（czxPrompt / czxConfirm）
   复用 .modal-* 体系，仅补充小尺寸与确认样式
   ========================================================== */
.modal.modal-sm { max-width: 400px; }
.form-control.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.confirm-ico {
    width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--info-bg); color: var(--info);
}
.confirm-ico.danger { background: var(--danger-bg); color: var(--danger); }
.confirm-msg { font-size: 14.5px; color: var(--text); line-height: 1.7; }

/* ==========================================================
   首页改版新增区块
   ========================================================== */
/* 信任背书条 */
.trust-strip {
    display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: center; align-items: center;
    padding: 22px 26px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); margin-top: 38px;
}
.trust-item { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.trust-item .ico { color: var(--brand); width: 18px; height: 18px; }

/* 三步接入 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
    position: relative; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 26px 24px; overflow: hidden;
}
.step::before {
    content: ''; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
    background: linear-gradient(90deg, var(--brand), #3d7bff); opacity: .9;
}
.step-num {
    width: 42px; height: 42px; border-radius: 13px; background: var(--brand-light);
    color: var(--brand); display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 17px; margin-bottom: 15px;
}
.step h3 { font-size: 16px; margin: 0 0 8px; }
.step p { font-size: 13.5px; color: var(--text-2); margin: 0; line-height: 1.75; }

/* 用户评价 */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.testi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.testi .stars { color: #f5a623; display: flex; gap: 2px; margin-bottom: 12px; }
.testi .stars .ico { width: 16px; height: 16px; }
.testi p { font-size: 14px; color: var(--text-1); line-height: 1.8; margin: 0 0 16px; }
.testi .who { display: flex; align-items: center; gap: 10px; }
.testi .avatar {
    width: 38px; height: 38px; border-radius: 50%; background: var(--brand-light);
    color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px;
}
.testi .who .name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.testi .who .role { font-size: 12px; color: var(--text-3); }

@media (max-width: 900px) {
    .steps, .testi-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   登录 / 注册页 Telegram 风格化
   干净柔和的浅色背景 + 缓慢漂移光斑 + 卡片内容错落入场
   ========================================================== */
.auth-wrap {
    background:
        radial-gradient(1100px 560px at 82% -12%, rgba(23, 99, 245, .09), transparent 60%),
        radial-gradient(900px 520px at -8% 112%, rgba(79, 140, 255, .09), transparent 60%),
        #f6f8fc;
}
.auth-bg-deco { opacity: .42; }
.auth-bg-deco.d1, .auth-bg-deco.d2, .auth-bg-deco.d3 { animation: authFloat 16s ease-in-out infinite; }
.auth-bg-deco.d2 { animation-delay: -6s; }
.auth-bg-deco.d3 { animation-delay: -11s; }
@keyframes authFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(28px, -22px) scale(1.08); }
}

/* 卡片去磨砂、更干净的 Telegram 风格 */
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 18px 50px rgba(20, 35, 70, .1);
    backdrop-filter: none;
    border-radius: 20px;
}
.reg-shell { box-shadow: 0 18px 50px rgba(20, 35, 70, .1); }

/* 输入框更柔和（Telegram 风格圆角） */
.auth-card .form-control,
.reg-shell .form-control,
.auth-card .input-icon,
.reg-shell .input-icon { border-radius: 10px; }
.auth-card .form-control,
.reg-shell .form-control { padding: 11px 13px; }
/* 修复：带图标的输入框在卡片内被上面的 padding 覆盖，导致图标与文字重叠 */
.auth-card .input-icon .form-control,
.reg-shell .input-icon .form-control { padding-left: 40px; }
.auth-card .input-icon.has-suffix .form-control,
.reg-shell .input-icon.has-suffix .form-control { padding-right: 42px; }

/* 卡片内容错落入场 */
.auth-card > .auth-logo,
.reg-shell > .reg-brand { animation: fieldIn .5s .02s cubic-bezier(.22, .8, .3, 1) both; }
.auth-card > .alert { animation: fieldIn .45s .06s cubic-bezier(.22, .8, .3, 1) both; }
.reg-shell > .reg-progress { animation: fieldIn .5s .08s cubic-bezier(.22, .8, .3, 1) both; }
.reg-shell > .alert { animation: fieldIn .45s .1s cubic-bezier(.22, .8, .3, 1) both; }
.reg-shell > .reg-scroll { animation: fieldIn .5s .16s cubic-bezier(.22, .8, .3, 1) both; }
.auth-card > form > .form-group,
.auth-card > form > .flex-between,
.auth-card > form > button { animation: fieldIn .5s cubic-bezier(.22, .8, .3, 1) both; }
.auth-card > form > .form-group:nth-of-type(1) { animation-delay: .1s; }
.auth-card > form > .form-group:nth-of-type(2) { animation-delay: .16s; }
.auth-card > form > .form-group:nth-of-type(3) { animation-delay: .22s; }
.auth-card > form > .flex-between { animation-delay: .28s; }
.auth-card > form > button { animation-delay: .34s; }
@keyframes fieldIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-bg-deco { animation: none !important; }
    .auth-card > *, .reg-shell > * { animation: none !important; }
}

/* ==========================================================
   吉祥物增强：光环呼吸 + 天线辉光 + 高光眼睛
   ========================================================== */
.m-halo { transform-box: fill-box; transform-origin: center; animation: mHalo 3.6s ease-in-out infinite; }
@keyframes mHalo {
    0%, 100% { opacity: .6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}
.m-ant-glow { transform-box: fill-box; transform-origin: center; animation: mAntGlow 1.8s ease-in-out infinite; }
@keyframes mAntGlow {
    0%, 100% { opacity: .2; transform: scale(1); }
    50% { opacity: .45; transform: scale(1.4); }
}
.m-eyes-hl { opacity: 1; transition: opacity .2s; }
.mascot.ok .m-eyes-hl, .mascot.err .m-eyes-hl { opacity: 0; }

/* OTP 动效减弱偏好（无障碍） */
@media (prefers-reduced-motion: reduce) {
    .otp-spark, .otp-merged::before, .otp-merged::after,
    .om-loader-arc, .om-check-path, .om-cross-path { animation: none !important; }
}

/* ==========================================================
   云朵吉祥物（品牌「薯芯云」重设计）
   ========================================================== */
.mascot .m-body { animation: mFloat 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.mascot .m-eye { animation: mBlink 4.4s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes mBlink { 0%, 92%, 100% { transform: scaleY(1); } 95%, 97% { transform: scaleY(.1); } }

.mascot .hand { transition: transform .4s cubic-bezier(.34, 1.5, .5, 1); }
.mascot .hand-l, .mascot .hand-r { transform-origin: center; }
.mascot.peek .hand-l { transform: translate(22px, -13px); }
.mascot.peek .hand-r { transform: translate(-22px, -13px); }
.mascot.peek .m-mouth { d: path("M57 69 q9 9 18 0"); }

.m-sun { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0); }
.m-rain { opacity: 0; }

/* 开心（验证成功）：眯眯眼 + 弹跳 + 太阳升起 */
.mascot.ok .m-eyes, .mascot.ok .m-eyes-hl { opacity: 0; }
.mascot.ok .m-eyes-happy { opacity: 1; }
.mascot.ok .m-body { animation: mCheer .7s cubic-bezier(.3, 1.6, .4, 1) 2; }
.mascot.ok .m-cheek { fill: #ff9fc0; }
.mascot.ok .m-sun { opacity: 1; animation: mSunPop .6s cubic-bezier(.3, 1.7, .4, 1) both; }
@keyframes mCheer { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-11px) scale(1.05); } 70% { transform: translateY(0) scale(.97); } }
@keyframes mSunPop { from { opacity: 0; transform: scale(0) rotate(-40deg); } to { opacity: 1; transform: scale(1) rotate(0); } }

/* 难过（验证失败）：眯眼 + 下雨 */
.mascot.err .m-body { animation: mSad .9s ease both; }
.mascot.err .m-eyes-hl, .mascot.err .m-eyes-happy { opacity: 0; }
.mascot.err .m-eye { animation: none; transform: scaleY(.25); }
.mascot.err .m-mouth { d: path("M57 72 q9 -6 18 0"); }
.mascot.err .m-rain { opacity: 1; }
.mascot.err .m-rain .rd { animation: mRain 1s ease-in infinite; }
.mascot.err .m-rain .rd:nth-child(2) { animation-delay: .25s; }
.mascot.err .m-rain .rd:nth-child(3) { animation-delay: .5s; }
@keyframes mSad { 0% { transform: rotate(0); } 30% { transform: rotate(-6deg) translateY(2px); } 60% { transform: rotate(4deg); } 100% { transform: rotate(-3deg) translateY(2px); } }
@keyframes mRain { 0% { opacity: 0; transform: translateY(-7px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(15px); } }

/* OTP 成功 / 失败 的最终回弹与抖动已合并到上方「中央结果圆」区块，避免多层 transform 互相打架 */

/* ==========================================================
   机器人吉祥物（薯芯云 · 品牌蓝 + 胸口云朵徽标）
   设计要点：多状态（正常/开心/难过/捂眼）+ 次级运动（浮动/眨眼/天线脉动），杜绝僵硬
   —— 后置于文件末尾，以同等优先级覆盖上方旧版云朵/机器人区块
   ========================================================== */
.mascot-svg { width: 134px; height: 144px; overflow: visible; }
.mascot .m-shadow { transition: transform .4s ease, opacity .4s ease; }

.mascot .m-body { animation: mFloat 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
.mascot .m-ant  { transform-box: fill-box; transform-origin: center; animation: mAntPulse 1.9s ease-in-out infinite; }
.mascot .m-eye  { transform-box: fill-box; transform-origin: center; animation: mBlink 4.6s infinite; }
.mascot .m-eyes-happy { opacity: 0; }
.mascot .m-eyes-hl    { opacity: 1; transition: opacity .2s; }
.mascot .hand { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }

/* 开心（验证成功） */
.mascot.ok .m-eyes, .mascot.ok .m-eyes-hl { opacity: 0; }
.mascot.ok .m-eyes-happy { opacity: 1; }
.mascot.ok .m-body { animation: mCheer .7s cubic-bezier(.3, 1.6, .4, 1) 2; }
.mascot.ok .m-cheek { fill: #ff9fc0; }
.mascot.ok .m-emblem { fill: #ffe08a; opacity: 1; }
.mascot.ok .m-ant { animation: mAntPulse .8s ease-in-out infinite; }

/* 难过（验证失败） */
.mascot.err .m-body { animation: mSad .9s ease both; }
.mascot.err .m-eyes-hl, .mascot.err .m-eyes-happy { opacity: 0; }
.mascot.err .m-eye { animation: none; transform: scaleY(.25); }
.mascot.err .m-mouth { d: path("M63 79 q7 -6 14 0"); }
.mascot.err .m-ant { animation: mAntErr 1s ease-in-out infinite; }

/* 捂眼（输入密码时） */
.mascot.peek .m-eyes, .mascot.peek .m-eyes-hl, .mascot.peek .m-eyes-happy { opacity: 0; }
.mascot.peek .m-mouth { d: path("M63 77 q7 5 14 0"); }
.mascot.peek .hand-l { transform-box: fill-box; transform-origin: center; animation: mCoverL .9s cubic-bezier(.34,1.4,.5,1) both; }
.mascot.peek .hand-r { transform-box: fill-box; transform-origin: center; animation: mCoverR .9s cubic-bezier(.34,1.4,.5,1) both; }
.mascot.peek .m-body { animation: mPeek .6s ease; }
.mascot.peek .m-cheek { animation: mBlush 1s ease-in-out infinite alternate; }
@keyframes mCoverL {
  0%   { transform: translate(0,0) rotate(0); }
  40%  { transform: translate(25px,-52px) rotate(0); }
  55%  { transform: translate(25px,-54px) rotate(-6deg); }
  70%  { transform: translate(25px,-51px) rotate(0); }
  85%  { transform: translate(25px,-53px) rotate(5deg); }
  100% { transform: translate(25px,-52px) rotate(0); }
}
@keyframes mCoverR {
  0%   { transform: translate(0,0) rotate(0); }
  40%  { transform: translate(-25px,-52px) rotate(0); }
  55%  { transform: translate(-25px,-54px) rotate(6deg); }
  70%  { transform: translate(-25px,-51px) rotate(0); }
  85%  { transform: translate(-25px,-53px) rotate(-5deg); }
  100% { transform: translate(-25px,-52px) rotate(0); }
}
@keyframes mBlush { from { opacity: .5; } to { opacity: 1; } }

@keyframes mFloat  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes mAntPulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes mBlink  { 0%, 92%, 100% { transform: scaleY(1); } 95%, 97% { transform: scaleY(.1); } }
@keyframes mCheer  { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-12px) scale(1.05); } 70% { transform: translateY(0) scale(.97); } }
@keyframes mSad    { 0% { transform: rotate(0); } 30% { transform: rotate(-6deg) translateY(2px); } 60% { transform: rotate(4deg); } 100% { transform: rotate(-3deg) translateY(2px); } }
@keyframes mPeek   { 0% { transform: translateY(0); } 50% { transform: translateY(-3px); } 100% { transform: translateY(0); } }
@keyframes mAntErr { 0%, 100% { fill: #ff5b6e; opacity: .7; } 50% { fill: #ff2d44; opacity: 1; } }
@keyframes cellPop { 0% { transform: scale(.82); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes mBreath { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.05); } }

/* ==================== 吉祥物「说话」微调 ==================== */
.mascot.talking .mascot-svg { animation: mTalk .5s ease-in-out infinite; }
@keyframes mTalk { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ==================== 注册成功页增强 ==================== */
.reg-done { animation: regDoneIn .6s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes regDoneIn { 0% { opacity: 0; transform: scale(.92) translateY(10px); } 100% { opacity: 1; transform: none; } }
.done-ring { position: relative; }
.done-ring::after {
    content: ''; position: absolute; inset: -7px; border-radius: 50%;
    border: 2px solid var(--success); opacity: 0;
    animation: doneRing 1.5s ease-out .25s 1;
}
@keyframes doneRing { 0% { opacity: .7; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.55); } }

/* ==================== 用户中心 AI 助手悬浮窗 ==================== */
.czx-ai-fab {
    position: fixed; right: 22px; bottom: 22px; z-index: 60;
    width: 56px; height: 56px; border-radius: 18px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #1763f5, #0f4cd0); color: #fff;
    box-shadow: 0 10px 28px rgba(23, 99, 245, .42);
    display: flex; align-items: center; justify-content: center;
    transition: transform .25s, box-shadow .25s;
}
.czx-ai-fab svg { width: 42px; height: 45px; overflow: visible; }
/* 悬浮按钮里的机器人沿用注册页动效：轻轻浮动 + 眨眼 */
.czx-ai-fab .m-body { animation: mFloat 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.czx-ai-fab .m-eye, .czx-ai-avatar .m-eye { animation: mBlink 4.6s infinite; transform-box: fill-box; transform-origin: center; }
.czx-ai-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 34px rgba(23, 99, 245, .5); }
.czx-ai-fab.active { transform: scale(.92); }
.czx-ai-fab::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    border: 2px solid rgba(23, 99, 245, .5); animation: aiPulse 2s ease-out infinite;
}
@keyframes aiPulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.4); opacity: 0; } }

.czx-ai-panel {
    position: fixed; right: 22px; bottom: 90px; z-index: 61;
    width: 360px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 120px);
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .22);
    display: flex; flex-direction: column; overflow: hidden;
    transform: translateY(16px) scale(.96); opacity: 0; pointer-events: none;
    transition: transform .28s cubic-bezier(.2, .8, .3, 1), opacity .28s;
}
.czx-ai-panel.open { transform: none; opacity: 1; pointer-events: auto; }

.czx-ai-head {
    display: flex; align-items: center; gap: 10px; padding: 14px 16px;
    background: linear-gradient(135deg, #1763f5, #0f4cd0); color: #fff;
}
.czx-ai-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.czx-ai-avatar {
    width: 36px; height: 36px; border-radius: 11px; flex: none;
    background: rgba(255, 255, 255, .18);
    display: flex; align-items: center; justify-content: center;
}
.czx-ai-avatar svg { width: 26px; height: 28px; }
.czx-ai-msg .czx-ai-avatar.sm svg { width: 20px; height: 21px; }
.czx-ai-title { font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.czx-ai-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; opacity: .92; margin-top: 3px; }
.czx-ai-status-ic { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); flex: none; }
.czx-ai-status.listening .czx-ai-status-ic { background: #7df0a0; animation: aiStatusDot 1s ease-in-out infinite; }
.czx-ai-status.working   .czx-ai-status-ic { background: #ffd166; animation: aiStatusDot .9s ease-in-out infinite; }
.czx-ai-status.listening .czx-ai-status-txt { color: #d9ffe6; }
.czx-ai-status.working   .czx-ai-status-txt { color: #ffe9bf; }
@keyframes aiStatusDot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: .55; } }
/* 机器人状态动效：聆听中微微点头，思考时轻轻起伏 */
.czx-ai-head .czx-ai-avatar svg { transition: transform .2s; }
.czx-ai-head.listening .czx-ai-avatar svg { animation: aiNod .8s ease-in-out infinite; }
.czx-ai-head.working   .czx-ai-avatar svg { animation: aiBounce 1.1s ease-in-out infinite; }
@keyframes aiNod { 0%, 100% { transform: rotate(0) translateY(0); } 30% { transform: rotate(-8deg) translateY(0); } 65% { transform: rotate(5deg) translateY(0); } }
@keyframes aiBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.czx-ai-close {
    background: rgba(255, 255, 255, .18); border: none; color: #fff;
    width: 30px; height: 30px; border-radius: 9px; cursor: pointer; flex: none;
    display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.czx-ai-close:hover { background: rgba(255, 255, 255, .32); }
.czx-ai-close svg { width: 18px; height: 18px; }

.czx-ai-body {
    flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px;
    background: var(--bg-soft, #f6f8fc);
}
.czx-ai-msg { display: flex; gap: 8px; align-items: flex-end; }
.czx-ai-msg .czx-ai-avatar.sm {
    width: 28px; height: 28px; border-radius: 9px; flex: none;
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.czx-ai-msg.bot .czx-ai-avatar.sm { background: linear-gradient(135deg, #1763f5, #0f4cd0); }
.czx-ai-msg.me { flex-direction: row-reverse; }
.czx-ai-msg.me .czx-ai-avatar.sm { background: var(--text-3, #94a3b8); }
.czx-ai-bubble {
    padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.6;
    word-break: break-word; max-width: 78%; box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.czx-ai-msg.bot .czx-ai-bubble {
    background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text-1);
}
.czx-ai-msg.me .czx-ai-bubble {
    background: var(--brand); color: #fff; border-bottom-right-radius: 4px;
}
.czx-ai-msg.typing .czx-ai-bubble { display: flex; align-items: center; gap: 7px; padding: 11px 14px; }
.czx-ai-coin { display: inline-flex; flex: none; animation: aiCoin 1.1s ease-in-out infinite; }
@keyframes aiCoin { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-14deg); } }
.czx-ai-thinking-txt { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.czx-ai-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3, #94a3b8); opacity: .5; animation: aiDot 1.2s infinite; }
.czx-ai-dot:nth-child(2) { animation-delay: .2s; }
.czx-ai-dot:nth-child(3) { animation-delay: .4s; }
@keyframes aiDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

.czx-ai-quick { display: none; flex-wrap: wrap; gap: 8px; padding: 10px 14px 0; }
.czx-ai-chip {
    border: 1px solid var(--border); background: #fff; color: var(--text-1);
    border-radius: 999px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; transition: all .18s;
}
.czx-ai-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-bg, #eef4ff); }

.czx-ai-foot {
    display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px;
    border-top: 1px solid var(--border); background: var(--surface);
}
.czx-ai-input {
    flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px;
    padding: 9px 12px; font-size: 13.5px; line-height: 1.4; max-height: 120px;
    outline: none; font-family: inherit; color: var(--text-1); background: var(--bg-soft, #f6f8fc);
}
.czx-ai-input:focus { border-color: var(--brand); }
.czx-ai-send {
    width: 40px; height: 40px; flex: none; border: none; border-radius: 12px;
    background: var(--brand); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background .2s, transform .15s;
}
.czx-ai-send:hover { background: var(--brand-strong, #0f4cd0); }
.czx-ai-send:disabled { opacity: .5; cursor: default; }
.czx-ai-send svg { width: 20px; height: 20px; }

@media (max-width: 480px) {
    .czx-ai-panel { right: 12px; bottom: 80px; width: calc(100vw - 24px); height: 70vh; }
    .czx-ai-fab { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .czx-ai-fab::before, .done-ring::after, .mascot.talking .mascot-svg, .reg-done { animation: none !important; }
    .czx-ai-panel { transition: opacity .2s; }
}
