/*
 * @Project Name: 卡尼奶主题授权插件 - 前端样式兼容层
 * @Description: knn-theme 前端缺少部分全局工具类（but/badg/jb-*/c-*/flex/间距/CSS变量），
 *               本文件补齐这些定义并桥接 knn-theme 变量体系（--knn-*）。
 *               类名与 knn-theme 主题自身输出的工具类保持一致（主题 post-frontend.php 等同款）。
 *               仅在插件购买页（body.order-pay）与前台用户中心（/account/）加载。
 *               暗色适配 knn-theme 的 body.dark-mode / body.dark-mode-auto。
 */

/* ==================== 一、变量桥接（工具类变量 → knn-theme 变量） ==================== */
body {
    --theme-color: var(--knn-color-primary, #007aff);
    --focus-color: var(--theme-color);
    --focus-shadow-color: rgba(0, 122, 255, 0.4);
    --focus-color-opacity1: rgba(0, 122, 255, 0.1);
    --focus-color-opacity05: rgba(0, 122, 255, 0.05);
    --focus-color-opacity3: rgba(0, 122, 255, 0.3);

    --key-color: var(--knn-text-color-strong, #333);
    --main-color: var(--knn-text-color, #4e5358);
    --main-shadow: rgba(116, 116, 116, 0.08);
    --muted-color: var(--knn-text-color-grey, #777);
    --muted-2-color: #999;
    --muted-3-color: #b1b1b1;
    --muted-4-color: #d2d2d2;

    --body-bg-color: var(--knn-bg-color, #f5f6f7);
    --main-bg-color: var(--knn-bg-color-card, #fff);
    --muted-bg-color: #eee;
    --muted-bg-2-color: #f6f7f8;
    --main-border-color: rgba(50, 50, 50, 0.06);
    --muted-border-color: rgba(0, 0, 0, 0.03);
    --main-radius: 8px;
    --mini-radius: calc(var(--main-radius) / 1.4);

    --blur-bg: rgba(255, 255, 255, 0.8);
}

body.dark-mode,
body.dark-mode-auto,
body.dark-theme {
    --key-color: #f8fafc;
    --main-color: #e5eef7;
    --main-shadow: rgba(24, 24, 24, 0.1);
    --muted-color: #b4b6bb;
    --muted-2-color: #888a8f;
    --muted-3-color: #636469;
    --muted-4-color: #43454a;

    --body-bg-color: var(--knn-bg-color, #292a2d);
    --main-bg-color: var(--knn-bg-color-card, #323335);
    --muted-bg-color: #2d2e31;
    --muted-bg-2-color: #37383a;
    --main-border-color: rgba(114, 114, 114, 0.1);
    --muted-border-color: rgba(184, 184, 184, 0.02);
    --blur-bg: rgba(50, 51, 53, 0.8);
}

/* ==================== 二、FontAwesome 图标兼容（插件模板 .fa.fa-xxx → FA6） ==================== */
/* knn-theme 前台加载 FA6 Free(solid)；插件模板使用旧版 .fa 写法 */
.fa {
    display: inline-block;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fa.fa-qq,
.fa.fa-wechat,
.fa.fa-gitlab,
.fa.fa-grav {
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
}

.fa-angle-double-right:before { content: "\f101"; }
.fa-angle-right:before { content: "\f105"; }
.fa-arrow-left:before { content: "\f060"; }
.fa-bell:before { content: "\f0f3"; }
.fa-bookmark:before { content: "\f02e"; }
.fa-bullhorn:before { content: "\f0a1"; }
.fa-cart-plus:before { content: "\f217"; }
.fa-check:before { content: "\f00c"; }
.fa-check-circle:before { content: "\f058"; }
.fa-chevron-down:before { content: "\f078"; }
.fa-chevron-left:before { content: "\f053"; }
.fa-chevron-right:before { content: "\f054"; }
.fa-chevron-up:before { content: "\f077"; }
.fa-clock-o:before { content: "\f017"; }
.fa-cloud-upload:before { content: "\f0ee"; }
.fa-copy:before { content: "\f0c5"; }
.fa-credit-card:before { content: "\f09d"; }
.fa-credit-card-alt:before { content: "\f283"; }
.fa-diamond:before { content: "\f219"; }
.fa-download:before { content: "\f019"; }
.fa-envelope:before { content: "\f0e0"; }
.fa-exclamation-circle:before { content: "\f06a"; }
.fa-exclamation-triangle:before { content: "\f071"; }
.fa-eye:before { content: "\f06e"; }
.fa-eye-slash:before { content: "\f070"; }
.fa-files-o:before { content: "\f0c5"; }
.fa-flag:before { content: "\f024"; }
.fa-gift:before { content: "\f06b"; }
.fa-gitlab:before { content: "\f296"; }
.fa-grav:before { content: "\f2d6"; }
.fa-heart:before { content: "\f004"; }
.fa-heart-o:before { content: "\f08a"; }
.fa-history:before { content: "\f1da"; }
.fa-id-card-o:before { content: "\f2c3"; }
.fa-info-circle:before { content: "\f05a"; }
.fa-key:before { content: "\f084"; }
.fa-lock:before { content: "\f023"; }
.fa-paper-plane-o:before { content: "\f1d8"; }
.fa-plus:before { content: "\f067"; }
.fa-qq:before { content: "\f1d6"; }
.fa-refresh:before { content: "\f021"; }
.fa-search:before { content: "\f002"; }
.fa-shield:before { content: "\f132"; }
.fa-shopping-cart:before { content: "\f07a"; }
.fa-sign-in:before { content: "\f090"; }
.fa-sitemap:before { content: "\f0e8"; }
.fa-spinner:before { content: "\f110"; }
.fa-tags:before { content: "\f02c"; }
.fa-thumbs-o-up:before { content: "\f164"; }
.fa-times:before { content: "\f00d"; }
.fa-times-circle:before { content: "\f057"; }
.fa-users:before { content: "\f0c0"; }
.fa-users-cog:before { content: "\f509"; }
.fa-wechat:before { content: "\f1d7"; }

.fa-spin {
    -webkit-animation: knn-auth-fa-spin 2s infinite linear;
    animation: knn-auth-fa-spin 2s infinite linear;
}

@-webkit-keyframes knn-auth-fa-spin {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes knn-auth-fa-spin {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* ==================== 三、按钮 / 徽章系统 ==================== */
.but,
.badg {
    border-radius: 4px;
    display: inline-block;
    transition: 0.15s;
    border: 1px solid var(--this-border);
    vertical-align: middle;
    padding: 0.3em 0.6em;
    text-align: center;
    font-weight: normal;
    box-shadow: var(--this-shadow);
    background: var(--this-bg);
    color: var(--this-color);
    --this-bg: rgba(136, 136, 136, 0.1);
    --this-border: transparent;
    --this-shadow: none;
    --this-color: #888;
    text-shadow: 0 0 0;
    line-height: 1.44;
}

.but a { color: inherit; }

a.but { cursor: pointer; }

.but.pw-1em {
    padding-right: 1em;
    padding-left: 1em;
}

.but .icon,
.but > .fa:not(.fa-angle-right) {
    margin-right: 0.25em;
}

.but.radius,
.badg.radius,
.radius > .but {
    border-radius: 50px;
    padding: 0.3em 1em;
}

.badg.p2-10,
.but.p2-10 {
    padding: 2px 10px;
}

.but.hollow,
.badg.hollow {
    background: transparent;
    --this-border: var(--this-color);
}

.badg.hollow[class*='b-'],
.but.hollow[class*='b-'] {
    background: 0 0;
    --this-border: var(--this-bg);
    --this-color: var(--this-bg);
}

.but:focus,
.but:hover {
    opacity: 0.8;
    color: var(--this-color);
    transition: 0.3s;
}

.but:active {
    --this-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.08);
}

.but.hollow:hover { background: var(--this-bg); }

.but.hollow[class*='b-']:hover { color: #fff; }

.but.hollow.c-white:hover {
    background: 0 0;
    --this-color: var(--focus-color);
    color: var(--focus-color);
}

.badg.main-radius,
.but.main-radius { border-radius: var(--main-radius); }

.badg.mini-radius,
.but.mini-radius { border-radius: var(--mini-radius); }

.circular,
.badg.cir,
.but.cir {
    padding: 0;
    border-radius: 5em;
    --this-size: 1.8em;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: var(--this-size);
    min-width: var(--this-size);
}

.but-group { display: inline-flex; }

.but-group > .but {
    border-radius: 0;
    margin: 0;
}

.but-group > .but:last-of-type { border-radius: 0 4px 4px 0; }

.but-group > .but:first-of-type { border-radius: 4px 0 0 4px; }

.but-average {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
}

.but-average.main-radius { border-radius: var(--main-radius); }

.but-average.mini-radius { border-radius: var(--mini-radius); }

.but-average.inline { display: inline-flex; }

.but-average.radius { border-radius: 100px; }

.but-average > .but {
    margin: 0 !important;
    border-radius: 0;
    flex: auto;
}

.but-average > .but.active {
    --this-bg: var(--focus-color-opacity1);
    --this-color: var(--focus-color);
}

.but.badg-sm,
.badg.badg-sm {
    font-size: 0.8em;
    padding: 0 0.2em;
    vertical-align: 0.1em;
    min-width: 1.6em;
}

.badg.badg-sm.cir { --this-size: 1.6em; }

.but.but-sm {
    font-size: 0.9em;
    padding: 0.1em 0.4em;
    vertical-align: 0.05em;
}

.active.badg,
.active > .badg {
    --this-bg: var(--focus-color);
    --this-color: #fff;
}

.active.badg.hollow,
.active > .hollow {
    --this-color: var(--focus-color);
}

/* 导航菜单徽章：主题 .menu-item-badge 与本插件通用 .badg 工具类同为单类、优先级相同，
   而本文件仅在购买页/用户中心加载并晚于主题样式，会覆盖导航徽章的尺寸与上标定位。
   用双类 .menu-item-badge.badg 提高优先级，还原 app.css 的徽章样式（去掉多余边框）。 */
.menu-item-badge.badg {
    padding: 0.1em 0.42em;
    border-radius: 50px;
    line-height: 1.2;
    vertical-align: 0.1em;
    border: 0;
}

.padding-lg,
.badg.badg-lg,
.but.padding-lg {
    padding: 0.5em 2em;
}

.but[disabled],
.but[disabled]:hover {
    opacity: 0.5;
    cursor: no-drop !important;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==================== 四、颜色系统（b-* 填充 / jb-* 渐变 / c-* 文字） ==================== */
.b-gray,
.b-theme,
.b-red,
.b-yellow,
.b-blue,
.b-blue-2,
.b-black,
.b-cyan,
.b-green,
.b-purple,
.jb-red,
.jb-pink,
.jb-yellow,
.jb-yellow-2,
.jb-blue,
.jb-cyan,
.jb-green,
.jb-purple,
.jb-vip1,
.jb-vip2 {
    color: var(--this-color);
    background: var(--this-bg);
    --this-color: #fff;
}

.jb-red,
.jb-pink,
.jb-yellow,
.jb-yellow-2,
.jb-blue,
.jb-cyan,
.jb-green,
.jb-purple,
.jb-vip1,
.jb-vip2 {
    border: none;
}

.b-theme { --this-bg: var(--focus-color); }
.b-gray { --this-bg: #818b95; }
.b-red { --this-bg: #ff5473; }
.b-yellow { --this-bg: #ff6f06; }
.b-cyan { --this-bg: #08c4c1; }
.b-blue { --this-bg: #2997f7; }
.b-blue-2 { --this-bg: #5c7cff; }
.b-green { --this-bg: #12b928; }
.b-purple { --this-bg: #d448f5; }
.b-black { --this-bg: #121517; }

.c-theme,
.c-gray,
.c-white,
.c-red,
.c-red-2,
.c-yellow,
.c-yellow-2,
.c-blue,
.c-blue-2,
.c-green,
.c-cyan,
.c-green-2,
.c-purple,
.c-purple-2 {
    color: var(--this-color);
}

.c-theme {
    --this-color: var(--focus-color);
    --this-bg: var(--focus-color-opacity1);
}

.c-gray {
    --this-color: #888;
    --this-bg: rgba(136, 136, 136, 0.1);
}

.c-white {
    --this-color: #fff;
    --this-bg: rgba(255, 255, 255, 0.1);
}

.c-red {
    --this-color: #ff5473;
    --this-bg: rgba(255, 84, 115, 0.1);
}

.c-red-2 {
    --this-color: #d6064c;
    --this-bg: rgba(194, 41, 46, 0.1);
}

.c-yellow {
    --this-color: #ff6f06;
    --this-bg: rgba(255, 111, 6, 0.1);
}

.c-yellow-2 {
    --this-color: #c58516;
    --this-bg: rgba(179, 103, 8, 0.1);
}

.c-blue {
    --this-color: #2997f7;
    --this-bg: rgba(41, 151, 247, 0.1);
}

.c-blue-2 {
    --this-color: #5c7cff;
    --this-bg: rgba(77, 130, 249, 0.1);
}

.c-cyan {
    --this-color: #09a4a1;
    --this-bg: rgba(8, 196, 193, 0.1);
}

.c-green {
    --this-color: #18a52a;
    --this-bg: rgba(18, 185, 40, 0.1);
}

.c-green-2 {
    --this-color: #6a933e;
    --this-bg: rgba(72, 135, 24, 0.1);
}

.c-purple {
    --this-color: #e434e1;
    --this-bg: rgba(213, 72, 245, 0.1);
}

.c-purple-2 {
    --this-color: #8e4aff;
    --this-bg: rgba(154, 72, 245, 0.1);
}

/* 渐变色填充 */
.jb-red {
    --this-bg-b: #fd7a64;
    --this-bg: linear-gradient(135deg, #fd7a64 10%, #fb2d2d 100%);
}

.jb-pink {
    --this-bg-b: #ff5e7f;
    --this-bg: linear-gradient(135deg, #ff5e7f 30%, #ff967e 100%);
}

.jb-yellow {
    --this-bg-b: #f59f54;
    --this-bg: linear-gradient(135deg, #f59f54 10%, #ff6922 100%);
}

.jb-yellow-2 {
    --this-bg-b: #f9a158;
    --this-bg: linear-gradient(135deg, #f9a158 10%, #f6b174 100%);
}

.jb-blue {
    --this-bg-b: #59c3fb;
    --this-bg: linear-gradient(135deg, #59c3fb 10%, #268df7 100%);
}

.jb-cyan {
    --this-bg-b: #039ab3;
    --this-bg: linear-gradient(140deg, #039ab3 10%, #58dbcf 90%);
}

.jb-green {
    --this-bg-b: #60e464;
    --this-bg: linear-gradient(135deg, #60e464 10%, #5cb85b 100%);
}

.jb-purple {
    --this-bg-b: #f98dfb;
    --this-bg: linear-gradient(135deg, #f98dfb 10%, #ea00f9 100%);
}

.jb-vip1 {
    --this-bg-b: #eabe7b;
    --this-bg: linear-gradient(25deg, #eabe7b 10%, #f5e3c7 70%, #edc788 100%);
    --this-color: #866127;
}

.jb-vip2 {
    --this-bg-b: #585555;
    --this-bg: linear-gradient(317deg, #4d4c4c 30%, #7b7b7b 70%, #5f5c5c 100%);
    --this-color: #ddd;
}

/* 文字渐变色 */
.cg-theme,
.cg-red,
.cg-gray,
.cg-white,
.cg-red-2,
.cg-yellow,
.cg-yellow-2,
.cg-blue,
.cg-blue-2,
.cg-green,
.cg-cyan,
.cg-green-2,
.cg-purple,
.cg-purple-2 {
    -webkit-background-clip: text;
    background-clip: text;
    --this-color: transparent;
    --this-gradient: linear-gradient(to right, var(--key-color), var(--muted-color));
    color: transparent;
    background-image: var(--this-gradient);
}

.cg-theme {
    --this-gradient: linear-gradient(99deg, var(--focus-color), var(--focus-color-opacity3));
    --this-color: var(--focus-color);
}

.cg-gray {
    --this-gradient: linear-gradient(99deg, #2f2f2f, #a9a9a9);
    --this-color: #888;
}

.cg-white {
    --this-gradient: linear-gradient(99deg, #fff, #acacac);
    --this-color: #fff;
}

.cg-red {
    --this-gradient: linear-gradient(99deg, #fc6161 0%, #ee34d8 100%);
    --this-color: #ff5473;
}

.cg-red-2 {
    --this-gradient: linear-gradient(99deg, #cb0d0d, #ff8ad3);
    --this-color: #c03060;
}

.cg-yellow {
    --this-gradient: linear-gradient(99deg, #f5c06d, #dc2114);
    --this-color: #ff6f06;
}

.cg-yellow-2 {
    --this-gradient: linear-gradient(99deg, #b1510c, #a8af2d);
    --this-color: #c58516;
}

.cg-blue {
    --this-gradient: linear-gradient(99deg, #65b2f5, #115ebe);
    --this-color: #2997f7;
}

.cg-blue-2 {
    --this-gradient: linear-gradient(99deg, #2854d8, #8771e9);
    --this-color: #5c7cff;
}

.cg-green {
    --this-gradient: linear-gradient(99deg, #70d37e, #54960d);
    --this-color: #12b928;
}

.cg-cyan {
    --this-gradient: linear-gradient(99deg, #23aa60, #08a6d6);
    --this-color: #09a4a1;
}

.cg-green-2 {
    --this-gradient: linear-gradient(99deg, #099507, #57ce67);
    --this-color: #5aa233;
}

.cg-purple {
    --this-gradient: linear-gradient(99deg, #de87e5, #7e15dd);
    --this-color: #b737e1;
}

.cg-purple-2 {
    --this-gradient: linear-gradient(99deg, #bd22dd, #aa82e8);
    --this-color: #d448f5;
}

@supports not ((-webkit-background-clip: text) and (background-clip: text)) {
    .cg-theme,
    .cg-red,
    .cg-gray,
    .cg-white,
    .cg-red-2,
    .cg-yellow,
    .cg-yellow-2,
    .cg-blue,
    .cg-blue-2,
    .cg-green,
    .cg-cyan,
    .cg-green-2,
    .cg-purple,
    .cg-purple-2 {
        color: var(--this-color);
        background-image: unset;
    }
}

/* ==================== 五、flex 布局轮子 ==================== */
.flex { display: flex; }

.inflex { display: inline-flex; }

.flex.hh,
.inflex.hh { flex-wrap: wrap; }

.flex.xx,
.inflex.xx { flex-direction: column; }

.flex.ac,
.inflex.ac { align-items: center; }

.flex.ab,
.inflex.ab { align-items: flex-end; }

.flex.abl,
.inflex.abl { align-items: baseline; }

.flex.at,
.inflex.at { align-items: flex-start; }

.flex.jc,
.inflex.jc {
    align-items: center;
    justify-content: center;
}

.flex.jsb,
.inflex.jsb { justify-content: space-between; }

.flex.jse { justify-content: space-evenly; }

.flex.jsa { justify-content: space-around; }

.flex .grow1 { flex-grow: 1; }

.flex .shrink0 { flex-shrink: 0; }

.flex .flex0 { flex: none; }

.flex .flex1 {
    flex: 1;
    overflow: hidden;
}

.flex .flex-auto { flex: auto; }

.flex .flex-auto-h {
    flex: auto;
    overflow: hidden;
}

.flex .flex2 { flex: 2; }

.flex .flex3 { flex: 3; }

.flex .flex4 { flex: 4; }

.flex .flex5 { flex: 5; }

.flex .ellipsis-box {
    overflow: hidden;
    max-width: 100%;
}

.flex > span.text-ellipsis,
.flex > a.text-ellipsis {
    display: inline-block;
}

.flex.gap3,
.inflex.gap3 { gap: 3px; }

.flex.gap6,
.inflex.gap6 { gap: 6px; }

.flex.gap10,
.inflex.gap10 { gap: 10px; }

.flex.gap20,
.inflex.gap20 { gap: 20px; }

.flex.gap30,
.inflex.gap30 { gap: 30px; }

.flex0 { flex: none; }

.order0 { order: 0; }
.order1 { order: 1; }
.order2 { order: 2; }

/* ==================== 六、间距工具 ==================== */
.block { display: block; }

.inline-block { display: inline-block; }

.mr3 { margin-right: 3px; }
.mr6 { margin-right: 6px; }
.mr10 { margin-right: 10px; }
.mrn10 { margin-right: -10px; }
.mr20 { margin-right: 20px; }
.ml3 { margin-left: 3px; }
.mln3 { margin-left: -3px; }
.mln6 { margin-left: -6px; }
.ml6 { margin-left: 6px; }
.ml10 { margin-left: 10px; }
.ml20 { margin-left: 20px; }
.mt3 { margin-top: 3px; }
.mt6 { margin-top: 6px; }
.mt10 { margin-top: 10px; }
.mtn6 { margin-top: -6px; }
.mtn10 { margin-top: -10px; }
.mt15 { margin-top: 15px; }
.mt20 { margin-top: 20px; }
.mb6 { margin-bottom: 6px; }
.mb10 { margin-bottom: 10px; }
.mb15 { margin-bottom: 15px; }
.mb20 { margin-bottom: 20px; }
.mb30 { margin-bottom: 30px; }
.mb40 { margin-bottom: 40px; }
.mm3 { margin: 3px; }

.list-mt10 + .list-mt10 { margin-top: 10px; }

.padding-6 { padding: 6px; }
.padding-h6 {
    padding-top: 6px;
    padding-bottom: 6px;
}
.padding-w6 {
    padding-left: 6px;
    padding-right: 6px;
}
.padding-10 { padding: 10px; }
.padding-h10 {
    padding-top: 10px;
    padding-bottom: 10px;
}
.padding-h15 {
    padding-top: 15px;
    padding-bottom: 15px;
}
.padding-w10 {
    padding-left: 10px;
    padding-right: 10px;
}
.padding-w15 {
    padding-left: 15px;
    padding-right: 15px;
}
.p-b6 { padding-bottom: 6px; }

/* ==================== 七、字号 / 文字 ==================== */
.px12 { font-size: 12px; }
.em09 { font-size: 0.9em; }
.em12 { font-size: 1.2em; }
.em14 { font-size: 1.4em; }
.em16 { font-size: 1.6em; }
.em2x { font-size: 2em; }
.em3x { font-size: 3em; }
.em4x { font-size: 4em; }

.font-bold { font-weight: bold; }
.font-normal { font-weight: normal; }

smail,
.smail { font-size: 0.8em; }

.key-color { color: var(--key-color); }
.focus-color {
    --this-color: var(--focus-color);
    color: var(--focus-color);
}
.muted-color { color: var(--muted-color); }
.muted-2-color { color: var(--muted-2-color); }
.muted-3-color { color: var(--muted-3-color); }
.main-bg { background: var(--main-bg-color); }

.opacity3 { opacity: 0.3; }
.opacity5 { opacity: 0.5; }
.opacity8 { opacity: 0.8; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.line-16 { line-height: 1.6; }
.line-18 { line-height: 1.8; }

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }

.hide { display: none !important; }

.relative { position: relative; }
.absolute { position: absolute; }

/* ==================== 八、容器 / 卡片 ==================== */
.container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.theme-box { margin-bottom: 20px; }

.article-content {
    background: var(--main-bg-color);
    border-radius: var(--main-radius);
    padding: 20px;
    box-shadow: 0 0 10px var(--main-shadow);
    color: var(--main-color);
}

.main-shadow {
    box-shadow: 0 0 10px var(--main-shadow);
    transition: box-shadow 0.3s;
}

.box-bg {
    background-color: var(--main-bg-color);
    box-shadow: 0 0 10px var(--main-shadow);
}

.zib-widget {
    clear: both;
    background-color: var(--main-bg-color);
    padding: 15px;
    box-shadow: 0 0 10px var(--main-shadow);
    border-radius: var(--main-radius);
    margin-bottom: 20px;
}

.zib-widget.mini-radius,
.muted-box.mini-radius { border-radius: var(--mini-radius); }

.zib-widget.radius4,
.muted-box.radius4 { border-radius: 4px; }

.muted-box {
    background-color: var(--this-bg, var(--muted-border-color));
    border-radius: var(--main-radius);
    padding: 15px;
}

.muted-box.active { background: var(--focus-color-opacity1); }

.border-box {
    border-radius: var(--main-radius);
    border: 1px solid var(--main-border-color);
    padding: 15px;
}

.noshadow { box-shadow: none !important; }

.box-body,
.box-header { padding: 15px; }

.zib-widget.notop,
.box-body.notop { padding-top: 0; }

.zib-widget.nobottom,
.box-body.nobottom { padding-bottom: 0; }

.box-header + .box-body { padding-top: 0; }

.radius4 { border-radius: 4px; }

.main-radius,
.radius8 { border-radius: var(--main-radius); }

.mini-radius { border-radius: var(--mini-radius); }

.radius { border-radius: 100px; }

.border-top { border-top: 1px solid var(--main-border-color); }
.border-bottom { border-bottom: 1px solid var(--main-border-color); }
.main-border { border: 1px solid var(--main-border-color); }
.muted-border { border: 1px solid var(--muted-border-color); }

.hollow-radio {
    padding: 10px;
    border: 1px solid var(--main-border-color);
    border-radius: var(--mini-radius);
    text-align: center;
}

.hollow-radio.active {
    border-color: var(--focus-color);
    background: var(--focus-color-opacity05);
}

/* ==================== 九、加载动画 ==================== */
.loading {
    content: '';
    width: 0.7em;
    height: 0.7em;
    display: inline-block;
    border: 0.08em solid transparent;
    border-width: calc(1px + 0.03em);
    border-radius: 50%;
    border-top-color: var(--this-color);
    border-bottom-color: var(--this-color);
    -webkit-animation: knn-auth-huan-rotate 1s cubic-bezier(0.7, 0.1, 0.31, 0.9) infinite;
    animation: knn-auth-huan-rotate 1s cubic-bezier(0.7, 0.1, 0.31, 0.9) infinite;
}

.loading.zts { --this-color: var(--theme-color); }

.loading-spot {
    height: 1em;
    --this-bg: var(--muted-2-color);
}

.loading-spot.zts { --this-bg: var(--focus-color); }

.loading-spot > *,
.loading-spot::before,
.loading-spot::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-radius: 5px;
    margin: 1.5px;
    -webkit-animation: knn-auth-ball-pulse 0.8s infinite ease-in-out;
    animation: knn-auth-ball-pulse 0.8s infinite ease-in-out;
    -webkit-animation-delay: 0s;
    animation-delay: 0s;
    border: 2px solid;
}

.loading-spot > * {
    -webkit-animation-delay: 0.15s;
    animation-delay: 0.15s;
}

.loading-spot::after {
    -webkit-animation-delay: 0.3s;
    animation-delay: 0.3s;
}

@-webkit-keyframes knn-auth-ball-pulse {
    33% { transform: translateY(4px); }
    66% { transform: translateY(-4px); }
    to { transform: translateY(0); }
}

@keyframes knn-auth-ball-pulse {
    33% { transform: translateY(4px); }
    66% { transform: translateY(-4px); }
    to { transform: translateY(0); }
}

@-webkit-keyframes knn-auth-huan-rotate {
    0% { transform: rotate(0); }
    to { transform: rotate(360deg); }
}

@keyframes knn-auth-huan-rotate {
    0% { transform: rotate(0); }
    to { transform: rotate(360deg); }
}

svg.loading-circle {
    animation: knn-auth-huan-rotate 2s linear infinite;
    fill: none;
}

svg.loading-circle circle {
    animation: knn-auth-loading-dash 1.5s ease-in-out infinite;
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    stroke-width: 3;
    stroke: var(--this-color, var(--main-color));
    stroke-linecap: round;
}

@keyframes knn-auth-loading-dash {
    0% {
        stroke-dasharray: 0, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -40px;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -120px;
    }
}

/* ==================== 十、骨架屏占位 ==================== */
.placeholder {
    background: linear-gradient(118deg, rgba(121, 121, 121, 0.1) 25%, rgba(121, 121, 121, 0.2) 37%, rgba(121, 121, 121, 0.1) 63%);
    opacity: 1;
    border-radius: 4px;
    -webkit-animation: knn-auth-placeholder 1.5s ease infinite !important;
    animation: knn-auth-placeholder 1.5s ease infinite !important;
    background-size: 400% 100% !important;
}

.placeholder.img { height: 119px; }
.placeholder.t1 { height: 24px; width: 80%; }
.placeholder.k1 { height: 20px; width: 60%; }
.placeholder.k2 { height: 20px; }
.placeholder.k3 { height: 15px; }
.placeholder.s1 {
    width: 70px;
    height: 15px;
    display: inline-block;
}

@-webkit-keyframes knn-auth-placeholder {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@keyframes knn-auth-placeholder {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ==================== 十一、价格框 / 支付标签 ==================== */
.price-box b { font-weight: 700; }

.price-box .pay-mark {
    font-size: 12px;
    margin-right: 3px;
}

.price-box .original-price {
    font-size: 0.5em;
    color: var(--muted-2-color);
    margin-left: 6px;
    text-decoration: line-through;
}

.price-box badge {
    font-size: 0.35em;
    line-height: 1.4;
    padding: 0.2em 0.6em;
    border-radius: 50px;
    background: linear-gradient(135deg, #f59f54 10%, #ff6922 100%);
    color: #fff;
    vertical-align: 0.3em;
    display: inline-block;
}

.pay-tag,
.payvip-icon {
    --this-color: #fff;
    --this-bg: linear-gradient(135deg, #ff74cd 10%, #ec7d0b 100%);
}

.payvip-icon {
    background: var(--this-bg);
    color: var(--this-color);
    border: none;
}

/* ==================== 十二、多彩背景 / 弹窗炫彩头 ==================== */
.modal-colorful-header,
.colorful-bg {
    background-size: 120%;
    overflow: hidden;
    position: relative;
    color: var(--this-color);
    background: var(--this-bg);
}

.colorful-bg > .colorful-make::after,
.colorful-bg > .colorful-make::before,
.colorful-bg > .colorful-make {
    position: absolute;
    color: var(--this-color);
    background: var(--this-bg);
    border-radius: 100%;
    content: ' ';
}

.colorful-bg > .colorful-make {
    bottom: 0;
    height: 290px;
    width: 323px;
    top: 60%;
}

.colorful-bg > .colorful-make::before {
    right: -558px;
    bottom: 0;
    height: 300px;
    width: 677px;
    top: -325px;
    transform: rotate(341deg);
    opacity: 0.6;
}

.colorful-bg > .colorful-make::after {
    left: -262px;
    bottom: 0;
    height: 214px;
    width: 402px;
    top: -170px;
    transform: rotate(326deg);
    opacity: 0.4;
}

.colorful-bg > .colorful-make + * { position: relative; }

.modal-colorful-header {
    border-radius: var(--main-radius) var(--main-radius) 0 0;
    background-size: 120%;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-colorful-header + * { margin-top: 120px; }

.modal-colorful-header > .close {
    position: absolute;
    right: 10px;
    top: 10px;
    color: var(--this-color);
    opacity: 0.6;
    font-size: 18px;
    z-index: 9;
    cursor: pointer;
}

/* ==================== 十三、表格基础 ==================== */
.table > tbody > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > td,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > thead > tr > th {
    vertical-align: middle;
    padding: 10px;
    border-top-color: var(--main-border-color);
}

.table-bordered,
.table-bordered > tbody > tr > td,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > td,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > thead > tr > th {
    border-color: var(--main-border-color);
}

.table.table-mini > * > * > td,
.table.table-mini > * > * > th {
    padding: 6px 10px;
}

/* ==================== 十四、滚动 / 头像 / 其他 ==================== */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scroll-y {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.overflow-hidden { overflow: hidden; }

.avatar {
    width: 100%;
    height: 100%;
    transition: all 0.2s;
    overflow: hidden;
    object-fit: cover;
    border-radius: 100px;
    display: inline-block;
}

.avatar-img,
.avatar-lg {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    --this-size: 38px;
    width: var(--this-size);
    height: var(--this-size);
}

.avatar-lg { --this-size: 80px; }
.avatar-mini { --this-size: 20px; }

.img-icon {
    height: 1.1em;
    max-width: 6em;
    vertical-align: -0.15em;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: inline-block;
}

.img-icon img { height: 100%; }

.separator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.separator:before,
.separator:after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--main-border-color);
}

.separator:before { margin-right: 10px; }
.separator:after { margin-left: 10px; }

/* 购买页文章内容区适配 knn-theme 主容器 */
body.order-pay main[role="main"] {
    display: block;
}

body.order-pay .theme-box.article-content {
    margin-top: 20px;
}

/* ==================== 十、授权管理板块（单列工作区） ==================== */
/* 配色变量（镜像我的钱包：蓝 #4f8bff→#2a7bff / 绿 #3ddc84→#2ecc71 / 红 #fd7a64→#fb2d2d）
   定义在 :root：侧边栏模块不在 .knn-auth-wrap 内，需全局可取 */
:root {
    --knn-auth-blue: linear-gradient(135deg, #4f8bff 10%, #2a7bff 100%);
    --knn-auth-green: linear-gradient(135deg, #3ddc84 10%, #2ecc71 100%);
    --knn-auth-red: linear-gradient(135deg, #fd7a64 10%, #fb2d2d 100%);
    --knn-auth-orange: linear-gradient(135deg, #ffb347 10%, #f5a623 100%);
}

/* ---------- 多产品横滑栏（单产品不输出） ---------- */
.knn-auth-topbar {
    width: 100%;
    margin-bottom: 14px;
    overflow: hidden;
}

.knn-auth-chips {
    display: flex;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    padding: 2px 1px 4px;
    box-sizing: border-box;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.knn-auth-chips::-webkit-scrollbar { display: none; }

.knn-auth-chip {
    flex: 0 0 auto;
    max-width: 220px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    scroll-snap-align: start;
}

.knn-auth-chip:hover {
    color: #2a7bff;
    text-decoration: none;
}

.knn-auth-chip.active {
    background: rgba(79, 139, 255, 0.12);
    color: #2a7bff;
    box-shadow: none;
}

/* ---------- 产品概览 Banner（渐变横幅） ---------- */
.knn-auth-banner {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    padding: 26px 28px;
    background: linear-gradient(120deg, #4f8bff 0%, #2a7bff 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(42, 123, 255, 0.25);
}

.knn-auth-banner::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -90px;
    right: -60px;
}

.knn-auth-banner::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -70px;
    right: 130px;
}

.knn-auth-banner-info {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 240px;
}

.knn-auth-banner-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.knn-auth-banner-name {
    font-size: 22px;
    font-weight: 700;
    margin: 10px 0 8px;
    line-height: 1.3;
}

.knn-auth-banner-name a {
    color: #fff;
    text-decoration: none;
}

.knn-auth-banner-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
}

.knn-auth-banner-meta .sep {
    margin: 0 8px;
    opacity: 0.5;
}

.knn-auth-banner-side {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 26px;
    flex-shrink: 0;
}

.knn-auth-banner-num {
    text-align: center;
}

.knn-auth-banner-num b {
    display: block;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.knn-auth-banner-num span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}

.knn-auth-banner-price {
    font-size: 30px;
    font-weight: 700;
}

.knn-auth-banner-price small {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    margin-left: 6px;
}

.knn-auth-banner-buy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #2a7bff;
    font-weight: 600;
    font-size: 14px;
    padding: 0.65em 1.6em;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.knn-auth-banner-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: #2a7bff;
    text-decoration: none;
}

/* ---------- 手风琴功能面板（整组一个单元，点标题展开） ---------- */
.knn-auth-acc {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.knn-auth-acc-item + .knn-auth-acc-item {
    border-top: 1px solid var(--main-border-color);
}

.knn-auth-acc-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 18px;
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
}

.knn-auth-acc-head:hover {
    background: rgba(79, 139, 255, 0.04);
}

.knn-auth-acc-t {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.knn-auth-acc-extra {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

.knn-auth-acc-arrow {
    color: #ccc;
    font-size: 12px;
    transition: transform 0.25s ease, color 0.25s ease;
}

.knn-auth-acc-item.open .knn-auth-acc-arrow {
    transform: rotate(180deg);
    color: #2a7bff;
}

.knn-auth-acc-body {
    display: none;
    padding: 2px 18px 18px;
}

.knn-auth-acc-item.open .knn-auth-acc-body {
    display: block;
}

/* 分区图标小块（手风琴标题内） */
.knn-auth-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    background: var(--knn-auth-blue);
    flex-shrink: 0;
}

.knn-auth-section-icon.green { background: var(--knn-auth-green); }
.knn-auth-section-icon.orange { background: var(--knn-auth-orange); }
.knn-auth-section-icon.red { background: var(--knn-auth-red); }

/* ---------- 小圆角按钮（行内） ---------- */
.knn-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 8px;
    padding: 0.55em 1.3em;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    background: var(--knn-auth-blue);
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.knn-auth-btn:hover,
.knn-auth-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(42, 123, 255, 0.3);
    color: #fff;
    text-decoration: none;
}

.knn-auth-btn.green {
    background: var(--knn-auth-green);
}

.knn-auth-btn.green:hover { box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3); }

.knn-auth-btn.orange {
    background: var(--knn-auth-orange);
}

.knn-auth-btn.orange:hover { box-shadow: 0 4px 10px rgba(245, 166, 35, 0.3); }

.knn-auth-btn.ghost {
    background: rgba(79, 139, 255, 0.1);
    color: #2a7bff;
}

.knn-auth-btn.ghost:hover {
    background: rgba(79, 139, 255, 0.18);
    color: #2a7bff;
    box-shadow: none;
}

.knn-auth-btn[disabled],
.knn-auth-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 按钮行 */
.knn-auth-actions-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

/* ---------- 软色面板 + 表单字段 ---------- */
.knn-auth-panel {
    background: #f6f9ff;
    border: 1px solid rgba(79, 139, 255, 0.12);
    border-radius: 12px;
    padding: 18px;
}

.knn-auth-field {
    display: block;
    width: 100%;
    background: #fff;
    border: 1px solid var(--main-border-color);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    color: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.knn-auth-field:focus {
    border-color: #4f8bff;
    box-shadow: 0 0 0 3px rgba(79, 139, 255, 0.12);
}

/* 行内表单：字段 + 按钮一排 */
.knn-auth-inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.knn-auth-inline-form .knn-auth-field {
    flex: 1;
    min-width: 0;
}

.knn-auth-inline-form .knn-auth-btn {
    flex-shrink: 0;
}

/* ---------- 信息行（订单/授权信息） ---------- */
.knn-auth-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--main-border-color);
    font-size: 14px;
}

.knn-auth-stat-row:last-child { border-bottom: 0; }

.knn-auth-stat-row .knn-auth-stat-label {
    color: #999;
    flex-shrink: 0;
    margin-right: 12px;
}

.knn-auth-stat-row .knn-auth-stat-value {
    font-weight: 600;
    color: #333;
    text-align: right;
    word-break: break-all;
}

/* ---------- 空状态 ---------- */
.knn-auth-null {
    text-align: center;
    padding: 26px 16px;
    color: #999;
    font-size: 14px;
}

.knn-auth-null .knn-auth-null-icon {
    font-size: 40px;
    opacity: 0.3;
    margin-bottom: 10px;
    display: block;
}

/* ---------- 提示文本 ---------- */
.knn-auth-muted {
    color: #999;
    font-size: 12px;
    line-height: 1.6;
}

.knn-auth-divider {
    border: 0;
    border-top: 1px dashed var(--main-border-color);
    margin: 14px 0;
}

/* 兑换结果提示 */
.knn-auth-card-result {
    margin-top: 10px;
    font-size: 13px;
    min-height: 1em;
}

/* ---------- 暗色模式 ---------- */
body.dark-mode .knn-auth-chip {
    background: #272727;
    color: #aaa;
}

body.dark-mode .knn-auth-chip.active {
    background: rgba(79, 139, 255, 0.18);
    color: #7cb3ff;
    box-shadow: none;
}

body.dark-mode .knn-auth-acc {
    background: #272727;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

body.dark-mode .knn-auth-acc-t {
    color: #e0e0e0;
}

body.dark-mode .knn-auth-acc-head:hover {
    background: rgba(79, 139, 255, 0.08);
}

body.dark-mode .knn-auth-stat-row .knn-auth-stat-value {
    color: #e0e0e0;
}

body.dark-mode .knn-auth-panel {
    background: rgba(79, 139, 255, 0.06);
    border-color: rgba(79, 139, 255, 0.15);
}

body.dark-mode .knn-auth-field {
    background: #1e1e1e;
}

body.dark-mode .knn-auth-btn.ghost {
    background: rgba(79, 139, 255, 0.15);
    color: #7cb3ff;
}

/* ---------- 移动端 ---------- */
@media (max-width: 767px) {
    .knn-auth-topbar {
        gap: 8px;
    }

    .knn-auth-acc-head {
        padding: 13px 14px;
    }

    .knn-auth-acc-body {
        padding: 2px 14px 14px;
    }

    .knn-auth-banner {
        padding: 20px;
    }

    .knn-auth-banner-side {
        gap: 18px;
    }

    .knn-auth-banner-num b {
        font-size: 20px;
    }

    .knn-auth-banner-buy {
        width: 100%;
        justify-content: center;
    }

    .knn-auth-inline-form {
        flex-wrap: wrap;
    }

    .knn-auth-inline-form .knn-auth-field {
        flex: 1 1 100%;
    }

    .knn-auth-inline-form .knn-auth-btn {
        width: 100%;
    }
}

/* ---------- 授权侧边栏：入口行卡（用户中心左侧） ---------- */
.knn-auth-side-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.knn-auth-side-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.knn-auth-side-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    background: var(--knn-auth-blue);
    box-shadow: 0 4px 10px rgba(42, 123, 255, 0.25);
}

.knn-auth-side-icon.is-green {
    background: var(--knn-auth-green);
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.25);
}

.knn-auth-side-icon.is-orange {
    background: var(--knn-auth-orange);
    box-shadow: 0 4px 10px rgba(245, 166, 35, 0.25);
}

.knn-auth-side-meta {
    flex: 1;
    min-width: 0;
}

.knn-auth-side-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.knn-auth-side-desc {
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.knn-auth-side-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(79, 139, 255, 0.1);
    color: #2a7bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.knn-auth-side-row:hover .knn-auth-side-arrow {
    background: var(--knn-auth-blue);
    color: #fff;
}

/* 授权数字高亮 */
.knn-auth-num {
    color: #fb2d2d;
}

/* 资源下载警示区 */
.knn-auth-warn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.knn-auth-warn-text {
    flex: 1;
    min-width: 260px;
}

.knn-auth-warn-qr {
    text-align: center;
    min-width: 150px;
}

.knn-auth-warn-qr img {
    max-width: 150px;
    height: auto;
    margin-bottom: 8px;
    border: 1px solid var(--main-border-color);
    padding: 5px;
    border-radius: 8px;
}

.knn-auth-warn-qr p {
    margin: 5px 0;
    font-size: 13px;
}

.knn-auth-warn-qq {
    color: #fb2d2d;
    font-weight: bold;
    font-size: 15px !important;
}

/* 暗色模式 */
body.dark-mode .knn-auth-side-row {
    background: #272727;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

body.dark-mode .knn-auth-side-row:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .knn-auth-side-title {
    color: #e0e0e0;
}

/* 移动端 */
@media (max-width: 767px) {
    .knn-auth-warn-text {
        min-width: 100%;
    }
}

/* ==================== 十一、绑定授权弹窗（重新设计，适配卡尼奶主题） ==================== */
.knn-auth-bind {
    padding: 2px;
    color: var(--main-color);
}

/* 头部：图标 + 标题 */
.knn-auth-bind-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.knn-auth-bind-head-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #fff;
    background: var(--knn-auth-blue);
    box-shadow: 0 6px 14px rgba(42, 123, 255, 0.28);
}

.knn-auth-bind-head-txt {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.knn-auth-bind-head-txt b {
    font-size: 17px;
    font-weight: 700;
    color: var(--key-color);
}

.knn-auth-bind-head-txt span {
    font-size: 12px;
    color: var(--muted-2-color);
    margin-top: 3px;
}

/* 说明区（红色提示卡片） */
.knn-auth-bind-notice {
    background: linear-gradient(135deg, rgba(255, 121, 100, 0.08), rgba(251, 45, 45, 0.05));
    border: 1px solid rgba(251, 45, 45, 0.12);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.knn-auth-bind-notice-t {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #fb2d2d;
    margin-bottom: 9px;
}

.knn-auth-bind-notice-t i {
    margin-right: 6px;
}

.knn-auth-bind-rules {
    margin: 0;
    padding: 0;
    list-style: none;
}

.knn-auth-bind-rules li {
    position: relative;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.95;
    color: var(--main-color);
}

.knn-auth-bind-rules li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 11px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fb2d2d;
}

.knn-auth-bind-notice-tip {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px dashed rgba(251, 45, 45, 0.15);
    font-size: 12px;
    color: var(--muted-color);
    line-height: 1.65;
}

/* 微信客服区 */
.knn-auth-bind-service {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: var(--muted-bg-2-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
}

.knn-auth-bind-qr {
    text-align: center;
    flex-shrink: 0;
}

.knn-auth-bind-qr img {
    display: block;
    width: 108px;
    height: 108px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--main-border-color);
    background: #fff;
    padding: 4px;
}

.knn-auth-bind-qr span {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    color: var(--muted-color);
}

.knn-auth-bind-service-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4bd863 10%, #1aad19 100%);
    box-shadow: 0 6px 14px rgba(26, 173, 25, 0.26);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.knn-auth-bind-service-btn i {
    font-size: 15px;
}

.knn-auth-bind-service-btn:hover,
.knn-auth-bind-service-btn:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(26, 173, 25, 0.34);
    text-decoration: none;
}

/* 表单区 */
.knn-auth-bind-form {
    margin: 0;
}

.knn-auth-bind-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--key-color);
    margin-bottom: 8px;
}

.knn-auth-bind-input {
    height: 44px;
    font-size: 14px;
    margin-bottom: 14px;
}

.knn-auth-bind-submit {
    width: 100%;
    height: 46px;
    font-size: 15px;
    border-radius: 50px;
}

/* 暗色模式 */
body.dark-mode .knn-auth-bind-head-txt b {
    color: #f0f0f0;
}

body.dark-mode .knn-auth-bind-service {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .knn-auth-bind-qr img {
    background: #fff;
}

/* 移动端 */
@media (max-width: 767px) {
    .knn-auth-bind-qr {
        display: none;
    }

    .knn-auth-bind-service {
        padding: 14px;
    }

    .knn-auth-bind-service-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== 十一（续）· 变更授权弹窗（复用绑定弹窗视觉语言） ==================== */
/* 两个分步区块共处一个 .knn-auth-bind 容器，靠 JS 切换显示 */
.knn-auth-change-modal .knn-auth-bind-head {
    margin-bottom: 16px;
}

/* 只读联系方式字段（邮箱 / 手机号） */
.knn-auth-readonly {
    background: var(--muted-bg-2-color);
    color: var(--muted-color);
    cursor: not-allowed;
    display: flex;
    align-items: center;
}

/* 验证码：输入框 + 发送按钮同排 */
.knn-auth-captcha-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
}

.knn-auth-captcha-row .knn-auth-bind-input {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.knn-auth-captcha-btn {
    flex-shrink: 0;
    height: 44px;
    padding: 0 16px;
    font-size: 13px;
    white-space: nowrap;
}

/* 变更授权：待更换域名下拉选择 */
.knn-auth-change-select {
    margin-bottom: 14px;
}

.knn-auth-change-select select {
    display: block;
    width: 100%;
    height: 44px;
    background: #fff;
    border: 1px solid var(--main-border-color);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--main-color);
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
}

.knn-auth-change-select select:focus {
    border-color: #4f8bff;
    box-shadow: 0 0 0 3px rgba(79, 139, 255, 0.12);
}

/* 暗色模式 */
body.dark-mode .knn-auth-readonly {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .knn-auth-change-select select {
    background: rgba(255, 255, 255, 0.04);
    color: #e6e6e6;
}

/* 移动端 */
@media (max-width: 480px) {
    .knn-auth-captcha-btn {
        padding: 0 12px;
    }
}

/* ==================== 使用须知与帮助（从资源下载独立出来的常显卡片） ==================== */
.knn-auth-help {
    background: var(--main-bg-color, #fff);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 18px;
    margin-top: 14px;
    color: var(--main-color);
}

.knn-auth-help-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.knn-auth-help-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
    background: var(--knn-auth-orange);
    box-shadow: 0 6px 14px rgba(245, 166, 35, 0.28);
}

.knn-auth-help-title {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.knn-auth-help-title b {
    font-size: 16px;
    font-weight: 700;
    color: var(--key-color);
}

.knn-auth-help-title span {
    font-size: 12px;
    color: var(--muted-2-color);
    margin-top: 3px;
}

/* 说明区：把后台自由填写的内容重排为清爽列表 */
.knn-auth-help-notice {
    background: var(--muted-bg-2-color, #f7f8fa);
    border-radius: 10px;
    padding: 14px 16px;
}

/* 归零后台内容里的工具类外边距，交由本卡片统一控制排版 */
.knn-auth-help-notice .mt10,
.knn-auth-help-notice .mr20,
.knn-auth-help-notice .ml20,
.knn-auth-help-notice .ml10,
.knn-auth-help-notice .mt6,
.knn-auth-help-notice .mb6 {
    margin: 0 !important;
}

.knn-auth-help-notice ul,
.knn-auth-help-notice ol {
    margin: 0;
    padding: 0;
}

.knn-auth-help-notice li {
    list-style: none;
    position: relative;
    padding-left: 18px;
    font-size: 13.5px;
    line-height: 2;
}

.knn-auth-help-notice li + li {
    margin-top: 2px;
}

.knn-auth-help-notice li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
}

.knn-auth-help-notice a.focus-color {
    font-weight: 600;
    text-decoration: none;
}

/* 快捷入口链接 → 药丸胶囊按钮 */
.knn-auth-help-notice .but {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    margin: 12px 10px 0 0;
    border-radius: 50px;
    background: var(--main-bg-color, #fff);
    border: 1px solid var(--main-border-color);
    color: var(--main-color);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.knn-auth-help-notice .but i {
    color: #f5a623;
}

.knn-auth-help-notice .but:hover {
    transform: translateY(-1px);
    border-color: #f5a623;
    box-shadow: 0 6px 14px rgba(245, 166, 35, 0.18);
    text-decoration: none;
}

/* 正版用户群二维码 */
.knn-auth-help-qr {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--muted-bg-2-color, #f7f8fa);
    border-radius: 10px;
}

.knn-auth-help-qr img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--main-border-color);
    background: #fff;
    padding: 4px;
    flex-shrink: 0;
}

.knn-auth-help-qr-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--main-color);
}

.knn-auth-help-qq {
    color: var(--muted-color);
    font-size: 12px;
}

/* 暗色模式 */
body.dark-mode .knn-auth-help,
body.dark-mode .knn-auth-help-notice,
body.dark-mode .knn-auth-help-qr {
    background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .knn-auth-help-title b {
    color: #f0f0f0;
}

body.dark-mode .knn-auth-help-notice .but {
    background: rgba(255, 255, 255, 0.05);
}

/* 移动端 */
@media (max-width: 767px) {
    .knn-auth-help-notice .but {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }

    .knn-auth-help-qr {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   第十二节 · 已绑定授权域名卡片（授权信息面板）
   —— 自包含结构，修复旧 ZIBLL 主题类导致的布局溢出塌陷
   关键：所有 flex 项 min-width:0，长授权码 word-break，防止撑坏
        .user-center-content (calc(100% - 320px)) 主内容列
   ========================================================================== */
.auth-domains-container {
    min-width: 0;
}

.auth-domains-list {
    min-width: 0;
    box-sizing: border-box;
}

.knn-auth-domain-card {
    background: var(--muted-bg-2-color, #f6f9ff);
    border: 1px solid var(--main-border-color, rgba(0, 0, 0, 0.08));
    border-radius: 12px;
    padding: 14px 16px;
    box-sizing: border-box;
    min-width: 0;
}

.knn-auth-domain-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.knn-auth-domain-name {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--key-color);
    word-break: break-all;
}

.knn-auth-domain-name i {
    color: #2a7bff;
    flex-shrink: 0;
}

.knn-auth-domain-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
}

.knn-auth-domain-tag {
    font-size: 12px;
    line-height: 1.6;
    padding: 2px 10px;
    border-radius: 50px;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.04);
}

.knn-auth-domain-key {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--main-border-color, rgba(0, 0, 0, 0.08));
    min-width: 0;
}

.knn-auth-domain-key-label {
    font-size: 12px;
    color: var(--muted-color);
    flex-shrink: 0;
}

.knn-auth-domain-key-val {
    flex: 1;
    min-width: 120px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    color: #fb2d2d;
    word-break: break-all;
}

.knn-auth-domain-key .auth-key-toggle {
    cursor: pointer;
    color: var(--muted-2-color);
    flex-shrink: 0;
}

.knn-auth-domain-key .auth-key-toggle:hover {
    color: var(--key-color);
}

.knn-auth-domain-btns {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* 行内小尺寸按钮（复制 / 刷新） */
.knn-auth-btn-sm {
    padding: 0.4em 0.9em;
    font-size: 12px;
    border-radius: 8px;
}

/* 暗色模式 */
body.dark-mode .knn-auth-domain-tag {
    background: rgba(255, 255, 255, 0.06);
}

/* 移动端 */
@media (max-width: 767px) {
    .knn-auth-domain-key-val {
        min-width: 0;
        flex-basis: 100%;
    }

    .knn-auth-domain-btns {
        width: 100%;
    }

    .knn-auth-domain-btns .knn-auth-btn-sm {
        flex: 1;
        justify-content: center;
    }
}
