@charset "UTF-8";
/* ============================================================
 * mes.css — MES 全局设计系统（高端实用型）
 *
 * 定位：全站公共基础层，替代 Bootstrap 5.3 CSS CDN。
 * 令牌与 inv.css（成品库存模块）完全同源，保证跨页面视觉一致：
 *   中性石板灰底 + 白面板 + 1px 发丝线 + 克制强调色。
 *
 * 旧页面 HTML 大量沿用 Bootstrap 类名（container/row/col/card/
 * table/btn/form-control/modal/nav/dropdown/工具类…），本文件对这批
 * 组件类做高颜值重新实现，页面无需改 HTML，只换 <link> 引用。
 *
 * JS 行为（collapse/modal/dropdown/tab 的类名切换）仍由
 * bootstrap.bundle.min.js 驱动，本文件只接管视觉。
 * ============================================================ */

/* ============================================================
 * 1. 设计令牌（与 inv.css 一致）
 * ============================================================ */
:root {
    /* 文字 */
    --ink:        #222222;
    --ink-2:      #555555;
    --ink-3:      #888888;
    --ink-4:      #a3a3a3;

    /* 面 / 线 */
    --bg:         #ffffff;
    --surface:    #f7f9fc;
    --surface-2:  #ffffff;
    --surface-3:  #edf2f9;
    --line:       #e6ebf2;
    --line-2:     #eff3f8;
    --line-3:     #d6dee8;

    /* 强调 / 语义 */
    --accent:     #1a3d6f;
    --accent-ink: #14315a;
    --accent-bg:  #e9eff6;
    --ok:         #348f5c;
    --ok-ink:     #2a7449;
    --ok-bg:      #eaf5ee;
    --warn:       #e07827;
    --warn-ink:   #c4661b;
    --warn-bg:    #fdf0e4;
    --danger:     #c0392b;
    --danger-ink: #a93226;
    --danger-bg:  #fbecea;
    --violet:     #6d5bd0;
    --violet-ink: #5b45b0;
    --violet-bg:  #f1eefb;
    --info:       #0e7490;
    --info-ink:   #155e75;
    --info-bg:    #e6f6fa;

    /* 尺寸 */
    --r-panel:    12px;
    --r-ctl:      8px;
    --r-chip:     5px;
    --h-ctl:      32px;

    /* 阴影（克制） */
    --shadow-sm:  0 1px 2px rgba(20,24,31,.05);
    --shadow-md:  0 4px 16px rgba(20,24,31,.08);
    --shadow-lg:  0 12px 40px rgba(20,24,31,.16);

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

/* 企微 / Android WebView 会按客户端「字体大小」改写默认字号，
   显式钉死根字号，避免整页尺寸跟着系统设置漂移 */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 13.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    color: var(--ink);
    font-weight: 650;
    line-height: 1.3;
}
h1 { font-size: 22px; } h2 { font-size: 19px; } h3 { font-size: 16.5px; }
h4 { font-size: 15px; }  h5 { font-size: 13.5px; } h6 { font-size: 12.5px; }

p { margin-top: 0; margin-bottom: 10px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; opacity: 1; }

code, kbd, pre, samp {
    font-family: var(--mono);
    font-size: .92em;
}
code {
    background: var(--surface-3);
    color: var(--ink);
    padding: 1px 5px;
    border-radius: 4px;
}

::selection { background: rgba(26,61,111,.14); }

/* 细滚动条（WebKit） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #d6dee8;
    border: 3px solid var(--bg);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: #c2ccd8; }

/* ============================================================
 * 2. 布局
 * ============================================================ */
.container, .container-fluid {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
    margin-right: auto;
    margin-left: auto;
}
.container { max-width: 1320px; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -8px;
    margin-left: -8px;
}
.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 8px;
    padding-left: 8px;
}
.col          { flex: 1 0 0%; }
.col-auto     { flex: 0 0 auto; width: auto; }
.col-1  { flex: 0 0 8.333333%;  max-width: 8.333333%; }
.col-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3  { flex: 0 0 25%;        max-width: 25%; }
.col-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5  { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6  { flex: 0 0 50%;        max-width: 50%; }
.col-7  { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9  { flex: 0 0 75%;        max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%;       max-width: 100%; }

@media (min-width: 576px) {
    .col-sm-auto { flex: 0 0 auto; width: auto; }
    .col-sm-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-sm-3  { flex: 0 0 25%;        max-width: 25%; }
    .col-sm-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-sm-6  { flex: 0 0 50%;        max-width: 50%; }
    .col-sm-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-sm-9  { flex: 0 0 75%;        max-width: 75%; }
    .col-sm-12 { flex: 0 0 100%;       max-width: 100%; }
}
@media (min-width: 768px) {
    .col-md-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3  { flex: 0 0 25%;        max-width: 25%; }
    .col-md-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5  { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6  { flex: 0 0 50%;        max-width: 50%; }
    .col-md-7  { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9  { flex: 0 0 75%;        max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-12 { flex: 0 0 100%;       max-width: 100%; }
}
@media (min-width: 992px) {
    .col-lg-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3  { flex: 0 0 25%;        max-width: 25%; }
    .col-lg-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-6  { flex: 0 0 50%;        max-width: 50%; }
    .col-lg-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-9  { flex: 0 0 75%;        max-width: 75%; }
    .col-lg-12 { flex: 0 0 100%;       max-width: 100%; }
}
@media (min-width: 1200px) {
    .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
}

/* 沟槽间距工具（g-1..g-5 作用于行列负边距 + 子项 padding） */
.g-0 { --g: 0;  }
.g-1 { --g: 4px; } .g-2 { --g: 8px; } .g-3 { --g: 16px; }
.g-4 { --g: 24px; } .g-5 { --g: 32px; }
.g-0,.g-1,.g-2,.g-3,.g-4,.g-5 {
    margin-right: calc(var(--g) * -1);
    margin-left:  calc(var(--g) * -1);
}
.g-0 > *, .g-1 > *, .g-2 > *, .g-3 > *, .g-4 > *, .g-5 > * {
    padding-right: var(--g);
    padding-left:  var(--g);
}

.d-inline       { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block        { display: block !important; }
.d-grid         { display: grid !important; }
.d-table        { display: table !important; }
.d-table-cell   { display: table-cell !important; }
.d-flex         { display: flex !important; }
.d-inline-flex  { display: inline-flex !important; }
.d-none         { display: none !important; }

@media (min-width: 576px)  {
    .d-sm-none { display: none !important; }
    .d-sm-inline { display: inline !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}
@media (min-width: 768px)  {
    .d-md-none { display: none !important; }
    .d-md-inline { display: inline !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}
@media (min-width: 992px)  {
    .d-lg-none { display: none !important; }
    .d-lg-inline { display: inline !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
}
@media (min-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-block { display: block !important; }
}

.float-start { float: left !important; }
.float-end   { float: right !important; }
.float-none  { float: none !important; }

/* ============================================================
 * 3. 弹性 / 对齐
 * ============================================================ */
.flex-row            { flex-direction: row !important; }
.flex-column         { flex-direction: column !important; }
.flex-row-reverse    { flex-direction: row-reverse !important; }
.flex-wrap           { flex-wrap: wrap !important; }
.flex-nowrap         { flex-wrap: nowrap !important; }
.justify-content-start   { justify-content: flex-start !important; }
.justify-content-end     { justify-content: flex-end !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around  { justify-content: space-around !important; }
.align-items-start   { align-items: flex-start !important; }
.align-items-end     { align-items: flex-end !important; }
.align-items-center  { align-items: center !important; }
.align-items-baseline{ align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }
.align-content-center{ align-content: center !important; }
.align-self-center   { align-self: center !important; }
.align-self-start    { align-self: flex-start !important; }
.align-self-end      { align-self: flex-end !important; }
.flex-fill     { flex: 1 1 auto !important; }
.flex-grow-0   { flex-grow: 0 !important; }
.flex-grow-1   { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }
.gap-5 { gap: 24px !important; }

/* ============================================================
 * 4. 间距
 * ============================================================ */
.m-0  { margin: 0 !important; }
.m-1  { margin: 4px !important; }
.m-2  { margin: 8px !important; }
.m-3  { margin: 12px !important; }
.m-4  { margin: 16px !important; }
.m-5  { margin: 24px !important; }
.m-auto { margin: auto !important; }
.mx-0 { margin-right: 0 !important; margin-left: 0 !important; }
.mx-1 { margin-right: 4px !important; margin-left: 4px !important; }
.mx-2 { margin-right: 8px !important; margin-left: 8px !important; }
.mx-3 { margin-right: 12px !important; margin-left: 12px !important; }
.mx-auto { margin-right: auto !important; margin-left: auto !important; }
.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-2 { margin-top: 8px !important; margin-bottom: 8px !important; }
.my-3 { margin-top: 12px !important; margin-bottom: 12px !important; }
.my-4 { margin-top: 16px !important; margin-bottom: 16px !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-4 { margin-top: 16px !important; }
.mt-5 { margin-top: 24px !important; }
.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: 4px !important; }
.me-2 { margin-right: 8px !important; }
.me-3 { margin-right: 12px !important; }
.me-auto { margin-right: auto !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 24px !important; }
.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 4px !important; }
.ms-2 { margin-left: 8px !important; }
.ms-3 { margin-left: 12px !important; }
.ms-auto { margin-left: auto !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 4px !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 16px !important; }
.p-4 { padding: 20px !important; }
.p-5 { padding: 28px !important; }
.px-0 { padding-right: 0 !important; padding-left: 0 !important; }
.px-2 { padding-right: 8px !important; padding-left: 8px !important; }
.px-3 { padding-right: 16px !important; padding-left: 16px !important; }
.px-4 { padding-right: 20px !important; padding-left: 20px !important; }
.py-1 { padding-top: 4px !important; padding-bottom: 4px !important; }
.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-3 { padding-top: 12px !important; padding-bottom: 12px !important; }
.py-4 { padding-top: 16px !important; padding-bottom: 16px !important; }
.py-5 { padding-top: 28px !important; padding-bottom: 28px !important; }
.pt-0 { padding-top: 0 !important; }
.pt-2 { padding-top: 8px !important; }
.pt-3 { padding-top: 12px !important; }
.pb-0 { padding-bottom: 0 !important; }
.pb-2 { padding-bottom: 8px !important; }
.pb-3 { padding-bottom: 12px !important; }
.ps-2 { padding-left: 8px !important; }
.ps-3 { padding-left: 12px !important; }
.pe-2 { padding-right: 8px !important; }
.pe-3 { padding-right: 12px !important; }

/* ============================================================
 * 5. 文字 / 工具
 * ============================================================ */
.text-start   { text-align: left !important; }
.text-center  { text-align: center !important; }
.text-end     { text-align: right !important; }
.text-wrap    { white-space: normal !important; }
.text-nowrap  { white-space: nowrap !important; }
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-break   { word-wrap: break-word !important; word-break: break-word !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-decoration-none { text-decoration: none !important; }
.text-underline { text-decoration: underline !important; }

.text-primary   { color: var(--accent) !important; }
.text-secondary { color: var(--ink-3) !important; }
.text-success   { color: var(--ok) !important; }
.text-danger    { color: var(--danger) !important; }
.text-warning   { color: var(--warn) !important; }
.text-info      { color: var(--info) !important; }
.text-light     { color: #e9edf3 !important; }
.text-dark      { color: var(--ink) !important; }
.text-muted     { color: var(--ink-3) !important; }
.text-white     { color: #fff !important; }
.text-body      { color: var(--ink) !important; }

.bg-primary   { background-color: var(--accent-bg) !important; color: var(--accent-ink) !important; }
.bg-secondary { background-color: var(--surface-3) !important; color: var(--ink-2) !important; }
.bg-success   { background-color: var(--ok-bg) !important; color: var(--ok-ink) !important; }
.bg-danger    { background-color: var(--danger-bg) !important; color: var(--danger-ink) !important; }
.bg-warning   { background-color: var(--warn-bg) !important; color: var(--warn-ink) !important; }
.bg-info      { background-color: var(--info-bg) !important; color: var(--info-ink) !important; }
.bg-light     { background-color: var(--surface-2) !important; }
.bg-dark      { background-color: #23272f !important; color: #f2f3f5 !important; }
.bg-white     { background-color: #fff !important; }
.bg-transparent { background-color: transparent !important; }
.text-bg-primary { background-color: var(--accent) !important; color: #fff !important; }
.text-bg-success { background-color: var(--ok) !important; color: #fff !important; }
.text-bg-danger  { background-color: var(--danger) !important; color: #fff !important; }
.text-bg-warning { background-color: var(--warn) !important; color: #fff !important; }
.text-bg-secondary { background-color: var(--ink-3) !important; color: #fff !important; }

.fw-lighter { font-weight: 300 !important; }
.fw-light   { font-weight: 400 !important; }
.fw-normal  { font-weight: 400 !important; }
.fw-medium  { font-weight: 500 !important; }
.fw-semibold{ font-weight: 600 !important; }
.fw-bold    { font-weight: 700 !important; }
.fst-italic { font-style: italic !important; }
.fst-normal { font-style: normal !important; }

.fs-1 { font-size: 24px !important; }
.fs-2 { font-size: 20px !important; }
.fs-3 { font-size: 17px !important; }
.fs-4 { font-size: 15px !important; }
.fs-5 { font-size: 14px !important; }
.fs-6 { font-size: 13px !important; }
.small     { font-size: 12px !important; }
.lead      { font-size: 15px !important; font-weight: 400; }

.lh-1 { line-height: 1 !important; }
.lh-sm { line-height: 1.35 !important; }
.lh-base { line-height: 1.55 !important; }
.lh-lg { line-height: 1.8 !important; }

.align-top       { vertical-align: top !important; }
.align-middle    { vertical-align: middle !important; }
.align-bottom    { vertical-align: bottom !important; }
.align-text-top  { vertical-align: text-top !important; }
.align-text-bottom { vertical-align: text-bottom !important; }
.align-baseline  { vertical-align: baseline !important; }

.w-25  { width: 25% !important; }
.w-50  { width: 50% !important; }
.w-75  { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.mw-100 { max-width: 100% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }
.mh-100 { max-height: 100% !important; }
.min-vh-100 { min-height: 100vh !important; }
.vh-100 { height: 100vh !important; }

.border         { border: 1px solid var(--line-3) !important; }
.border-0       { border: 0 !important; }
.border-top     { border-top: 1px solid var(--line) !important; }
.border-end     { border-right: 1px solid var(--line) !important; }
.border-bottom  { border-bottom: 1px solid var(--line) !important; }
.border-start   { border-left: 1px solid var(--line) !important; }
.border-start-0 { border-left: 0 !important; }
.border-primary { border-color: var(--accent) !important; }
.border-danger  { border-color: var(--danger) !important; }
.border-success { border-color: var(--ok) !important; }
.border-warning { border-color: var(--warn) !important; }
.border-secondary { border-color: var(--ink-4) !important; }

.rounded     { border-radius: var(--r-ctl) !important; }
.rounded-0   { border-radius: 0 !important; }
.rounded-1   { border-radius: 4px !important; }
.rounded-2   { border-radius: 6px !important; }
.rounded-3   { border-radius: 10px !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-pill   { border-radius: 999px !important; }

.shadow-none { box-shadow: none !important; }
.shadow-sm   { box-shadow: var(--shadow-sm) !important; }
.shadow      { box-shadow: var(--shadow-md) !important; }
.shadow-lg   { box-shadow: var(--shadow-lg) !important; }

.overflow-auto    { overflow: auto !important; }
.overflow-hidden  { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll  { overflow: scroll !important; }

.position-static   { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed    { position: fixed !important; }
.position-sticky   { position: sticky !important; }
.top-0    { top: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.start-0  { left: 0 !important; }
.end-0    { right: 0 !important; }
.translate-middle {
    transform: translate(-50%, -50%) !important;
}

.user-select-all  { user-select: all !important; }
.user-select-none { user-select: none !important; }
.pe-none   { pointer-events: none !important; }
.pe-auto   { pointer-events: auto !important; }
.cursor-pointer { cursor: pointer !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.opacity-0   { opacity: 0 !important; }
.opacity-25  { opacity: .25 !important; }
.opacity-50  { opacity: .5 !important; }
.opacity-75  { opacity: .75 !important; }
.opacity-100 { opacity: 1 !important; }

.z-n1 { z-index: -1 !important; }
.z-0  { z-index: 0 !important; }
.z-1  { z-index: 1 !important; }
.z-2  { z-index: 2 !important; }
.z-3  { z-index: 3 !important; }

.vr {
    display: inline-block;
    align-self: stretch;
    width: 1px;
    min-height: 1em;
    background-color: var(--line);
    opacity: 1;
}

/* ============================================================
 * 6. 按钮
 * ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: var(--h-ctl);
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--r-ctl);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--ink);
    background: var(--surface-3);
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background-color .12s ease, border-color .12s ease,
                color .12s ease, box-shadow .12s ease;
}
.btn:hover { background: var(--line-3); color: var(--ink); }
.btn:focus-visible {
    outline: 2px solid rgba(47,95,224,.35);
    outline-offset: 1px;
}
.btn:active { background: #cfd4dc; }
.btn:disabled, .btn.disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}
.btn .btn-check:focus + .btn,
.btn-check:checked + .btn { background: #cfd4dc; }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--accent-ink);
    border-color: var(--accent-ink);
    color: #fff;
}
.btn-primary:active { background: #20398f; border-color: #20398f; }

.btn-secondary {
    background: var(--surface-3);
    border-color: var(--surface-3);
    color: var(--ink-2);
}
.btn-secondary:hover { background: var(--line-3); border-color: var(--line-3); color: var(--ink); }

.btn-success {
    background: var(--ok); border-color: var(--ok); color: #fff;
}
.btn-success:hover { background: var(--ok-ink); border-color: var(--ok-ink); color: #fff; }

.btn-danger {
    background: var(--danger); border-color: var(--danger); color: #fff;
}
.btn-danger:hover { background: var(--danger-ink); border-color: var(--danger-ink); color: #fff; }

.btn-warning {
    background: var(--warn); border-color: var(--warn); color: #fff;
}
.btn-warning:hover { background: var(--warn-ink); border-color: var(--warn-ink); color: #fff; }

.btn-info {
    background: var(--info); border-color: var(--info); color: #fff;
}
.btn-info:hover { background: var(--info-ink); border-color: var(--info-ink); color: #fff; }

.btn-light {
    background: #fff; border-color: var(--line-3); color: var(--ink-2);
}
.btn-light:hover { background: var(--surface-2); border-color: var(--ink-4); color: var(--ink); }

.btn-dark {
    background: #23272f; border-color: #23272f; color: #f2f3f5;
}
.btn-dark:hover { background: #14181f; border-color: #14181f; color: #fff; }

.btn-link {
    background: transparent;
    border-color: transparent;
    color: var(--accent);
    text-decoration: none;
    padding: 0 4px;
    height: auto;
}
.btn-link:hover { color: var(--accent-ink); text-decoration: underline; background: transparent; }

.btn-outline-primary {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}
.btn-outline-primary:hover { background: var(--accent); color: #fff; }

.btn-outline-secondary {
    background: transparent;
    border-color: var(--ink-4);
    color: var(--ink-2);
}
.btn-outline-secondary:hover { background: var(--surface-3); border-color: var(--ink-3); color: var(--ink); }

.btn-outline-success {
    background: transparent; border-color: var(--ok); color: var(--ok);
}
.btn-outline-success:hover { background: var(--ok); color: #fff; }

.btn-outline-danger {
    background: transparent; border-color: var(--danger); color: var(--danger);
}
.btn-outline-danger:hover { background: var(--danger); color: #fff; }

.btn-outline-warning {
    background: transparent; border-color: var(--warn); color: var(--warn);
}
.btn-outline-warning:hover { background: var(--warn); color: #fff; }

.btn-outline-info {
    background: transparent; border-color: var(--info); color: var(--info);
}
.btn-outline-info:hover { background: var(--info); color: #fff; }

.btn-outline-light {
    background: transparent; border-color: rgba(255,255,255,.55); color: #fff;
}
.btn-outline-light:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }

.btn-outline-dark {
    background: transparent; border-color: #23272f; color: #23272f;
}
.btn-outline-dark:hover { background: #23272f; color: #f2f3f5; }

.btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 7px;
}
.btn-lg {
    height: 40px;
    padding: 0 20px;
    font-size: 14.5px;
    border-radius: 9px;
}

.btn-group {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}
.btn-group > .btn { position: relative; flex: 1 1 auto; }
.btn-group > .btn:not(:first-child) { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-group > .btn:not(:last-child)  { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group > .btn:hover { z-index: 1; }

.btn-close {
    width: 26px; height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink-3);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    position: relative;
}
.btn-close::before {
    content: "✕";
    display: block;
    font-weight: 400;
}
.btn-close:hover { background: var(--surface-3); color: var(--ink); }

/* ============================================================
 * 7. 表单
 * ============================================================ */
label, .form-label {
    display: inline-block;
    margin-bottom: 5px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-2);
}

.form-control, .form-select {
    display: block;
    width: 100%;
    height: var(--h-ctl);
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--ink);
    background-color: var(--surface);
    background-clip: padding-box;
    border: 1px solid var(--line-3);
    border-radius: var(--r-ctl);
    appearance: none;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.form-control::placeholder { color: var(--ink-4); }
.form-control:hover, .form-select:hover { border-color: var(--ink-4); }
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(47,95,224,.14);
}
.form-control:disabled, .form-control[readonly],
.form-select:disabled {
    background-color: var(--surface-3);
    color: var(--ink-3);
    opacity: 1;
    cursor: not-allowed;
}

textarea.form-control {
    height: auto;
    padding: 7px 10px;
    line-height: 1.5;
}

.form-control-sm, .form-select-sm {
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    border-radius: 7px;
}
.form-control-lg, .form-select-lg {
    height: 40px;
    padding: 0 14px;
    font-size: 14.5px;
}

.form-select {
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%238b93a1' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M2 5.5L8 11l6-5.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.form-text {
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--ink-3);
}

.form-check {
    display: block;
    min-height: 20px;
    padding-left: 24px;
    margin-bottom: 6px;
}
.form-check-input {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    margin-left: -24px;
    vertical-align: top;
    background-color: var(--surface);
    border: 1px solid var(--line-3);
    appearance: none;
}
.form-check-input[type="checkbox"] { border-radius: 4px; }
.form-check-input[type="radio"]    { border-radius: 50%; }
.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px;
}
.form-check-input[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='4' fill='%23fff'/%3E%3C/svg%3E");
    background-size: 9px;
}
.form-check-input:focus {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(47,95,224,.14);
}
.form-check-label { font-size: 13px; color: var(--ink); }

.form-switch { padding-left: 40px; }
.form-switch .form-check-input {
    width: 30px;
    height: 17px;
    margin-left: -40px;
    border-radius: 999px;
    background-image: none;
    background-position: left center;
    transition: background-position .15s ease;
}
.form-switch .form-check-input:checked {
    background-color: var(--accent);
    background-position: right center;
}
.form-switch .form-check-input:checked::after { transform: translateX(13px); }
.form-switch .form-check-input::after {
    content: "";
    display: block;
    width: 13px; height: 13px;
    margin: 1px 0 0 1px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(20,24,31,.25);
    transition: transform .15s ease;
}

.form-check-inline {
    display: inline-block;
    margin-right: 14px;
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}
.input-group > .form-control,
.input-group > .form-select,
.input-group > .btn {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
}
.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child),
.input-group > .btn:not(:first-child) {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child),
.input-group > .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 400;
    color: var(--ink-2);
    background: var(--surface-3);
    border: 1px solid var(--line-3);
    border-radius: var(--r-ctl);
    white-space: nowrap;
}
.input-group > .input-group-text:not(:first-child) {
    margin-left: -1px;
    border-top-left-radius: 0; border-bottom-left-radius: 0;
}
.input-group > .input-group-text:not(:last-child) {
    border-top-right-radius: 0; border-bottom-right-radius: 0;
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: var(--danger);
}
.form-control.is-invalid:focus, .form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(192,57,43,.14);
}
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--danger);
}
.is-invalid ~ .invalid-feedback { display: block; }

.form-floating { position: relative; }
.form-floating > .form-control {
    height: 52px;
    padding: 22px 12px 6px;
}
.form-floating > label {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    padding: 14px 12px;
    margin: 0;
    font-size: 13px;
    color: var(--ink-3);
    pointer-events: none;
    transform-origin: 0 0;
    transition: opacity .1s ease, transform .1s ease;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(.78) translateY(-8px);
    color: var(--ink-3);
}

/* ============================================================
 * 8. 卡片
 * ============================================================ */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--surface);
    background-clip: border-box;
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
    box-shadow: var(--shadow-sm);
}
.card > .list-group { border-top: inherit; border-bottom: inherit; }
.card-header {
    padding: 11px 16px;
    margin-bottom: 0;
    background-color: var(--surface-3);
    border-bottom: 1px solid var(--line);
    border-top-left-radius: var(--r-panel);
    border-top-right-radius: var(--r-panel);
    font-size: 13.5px;
    font-weight: 650;
    color: var(--ink);
}
.card-body {
    flex: 1 1 auto;
    padding: 16px;
}
.card-footer {
    padding: 11px 16px;
    background-color: var(--surface-3);
    border-top: 1px solid var(--line);
    border-bottom-left-radius: var(--r-panel);
    border-bottom-right-radius: var(--r-panel);
}
.card-title {
    margin-bottom: 8px;
    font-size: 14.5px;
    font-weight: 650;
    color: var(--ink);
}
.card-subtitle {
    margin-top: -4px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--ink-3);
}
.card-text:last-child { margin-bottom: 0; }
.card-link + .card-link { margin-left: 12px; }
.card-img-top { width: 100%; border-top-left-radius: var(--r-panel); border-top-right-radius: var(--r-panel); }

/* ============================================================
 * 9. 表格
 * ============================================================ */
.table {
    width: 100%;
    margin-bottom: 14px;
    color: var(--ink);
    vertical-align: middle;
    border-color: var(--line);
    border-collapse: collapse;
    font-size: 13px;
}
.table > :not(caption) > * > * {
    padding: 8px 10px;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: var(--line-2);
    background: var(--surface-2);
    box-shadow: none;
}
.table > thead {
    vertical-align: bottom;
}
.table > thead th {
    background: var(--surface-3);
    color: var(--ink-2);
    font-weight: 650;
    font-size: 12px;
    letter-spacing: .01em;
    border-bottom: 1px solid var(--line-3);
    white-space: nowrap;
}
.table > tbody tr:last-child > * { border-bottom: 0; }
.table > tbody tr:hover > * {
    background-color: var(--surface-3);
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #fafbfd;
}
.table-hover > tbody > tr:hover > * {
    background-color: var(--surface-3);
}
.table-striped.table-hover > tbody > tr:nth-of-type(odd):hover > * {
    background-color: var(--surface-3);
}
.table-bordered > :not(caption) > * {
    border-width: 1px 0;
}
.table-bordered > :not(caption) > * > * {
    border-width: 0 1px;
    border-style: solid;
    border-color: var(--line-2);
}
.table-sm > :not(caption) > * > * {
    padding: 4px 8px;
    font-size: 12.5px;
}
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-group-divider { border-top: 2px solid var(--line-3); }
caption { padding-top: 8px; padding-bottom: 8px; color: var(--ink-3); text-align: left; font-size: 12px; }
.table .btn-sm, .table .btn { white-space: nowrap; }

/* ============================================================
 * 10. 导航
 * ============================================================ */
.nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}
.nav-link {
    display: block;
    padding: 8px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    transition: color .12s ease;
}
.nav-link:hover, .nav-link:focus { color: var(--ink); }
.nav-link.disabled {
    color: var(--ink-4);
    pointer-events: none;
    cursor: default;
}
.nav-tabs {
    border-bottom: 1px solid var(--line-3);
    gap: 2px;
}
.nav-tabs .nav-link {
    margin-bottom: -1px;
    border: 1px solid transparent;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.nav-tabs .nav-link:hover {
    border-color: var(--line) var(--line) transparent;
    background: var(--surface-2);
}
.nav-tabs .nav-link.active {
    color: var(--accent-ink);
    background: var(--surface);
    border-color: var(--line-3) var(--line-3) var(--surface);
    font-weight: 600;
}
.nav-pills .nav-link {
    border-radius: 999px;
}
.nav-pills .nav-link.active {
    background: var(--accent);
    color: #fff;
}
.nav-fill .nav-item, .nav-fill > .nav-link { flex: 1 1 auto; text-align: center; }
.nav-justified .nav-item { flex-basis: 0; flex-grow: 1; text-align: center; }

.tab-content > .tab-pane { display: none; }
.tab-content > .active { display: block; }

/* ============================================================
 * 11. 徽章 / 提示
 * ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    color: var(--ink-2);
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--r-chip);
    background: var(--surface-3);
}
.badge.bg-primary, .badge.text-bg-primary { background: var(--accent) !important; color: #fff !important; }
.badge.bg-success, .badge.text-bg-success { background: var(--ok) !important; color: #fff !important; }
.badge.bg-danger,  .badge.text-bg-danger  { background: var(--danger) !important; color: #fff !important; }
.badge.bg-warning, .badge.text-bg-warning { background: var(--warn) !important; color: #fff !important; }
.badge.bg-info,    .badge.text-bg-info    { background: var(--info) !important; color: #fff !important; }
.badge.bg-secondary, .badge.text-bg-secondary { background: var(--ink-3) !important; color: #fff !important; }

.alert {
    position: relative;
    padding: 11px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    border: 1px solid transparent;
    border-left-width: 3px;
    border-radius: var(--r-ctl);
    background: var(--surface-2);
    color: var(--ink);
}
.alert-success { background: var(--ok-bg);    border-left-color: var(--ok);    color: var(--ok-ink); }
.alert-danger  { background: var(--danger-bg); border-left-color: var(--danger); color: var(--danger-ink); }
.alert-warning { background: var(--warn-bg);  border-left-color: var(--warn);  color: var(--warn-ink); }
.alert-info    { background: var(--info-bg);  border-left-color: var(--info);  color: var(--info-ink); }
.alert-primary { background: var(--accent-bg); border-left-color: var(--accent); color: var(--accent-ink); }
.alert-secondary { background: var(--surface-3); border-left-color: var(--ink-3); color: var(--ink-2); }
.alert .btn-close {
    position: absolute;
    top: 8px; right: 10px;
}

/* ============================================================
 * 12. 列表组
 * ============================================================ */
.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    border-radius: var(--r-ctl);
}
.list-group-item {
    position: relative;
    display: block;
    padding: 9px 14px;
    margin-bottom: -1px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
}
.list-group-item:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.list-group-item:last-child { margin-bottom: 0; border-bottom-right-radius: inherit; border-bottom-left-radius: inherit; }
.list-group-item:hover { background: var(--surface-2); color: var(--ink); }
.list-group-item.active {
    background: var(--accent-bg);
    border-color: var(--accent-bg);
    color: var(--accent-ink);
    font-weight: 600;
    z-index: 1;
}
.list-group-item.disabled { color: var(--ink-4); background: var(--surface-2); pointer-events: none; }

/* ============================================================
 * 13. 下拉菜单
 * ============================================================ */
.dropdown { position: relative; }
.dropdown-toggle { white-space: nowrap; }
.dropdown-toggle::after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    vertical-align: 2px;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}
.dropdown-menu {
    position: absolute;
    z-index: 1000;
    top: 100%;
    left: 0;
    display: none;
    min-width: 160px;
    padding: 5px;
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--ink);
    text-align: left;
    list-style: none;
    background-color: var(--surface);
    background-clip: padding-box;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}
.dropdown-menu.show { display: block; }
.dropdown-menu-end { right: 0; left: auto; }
.dropdown-item {
    display: block;
    width: 100%;
    padding: 7px 11px;
    clear: both;
    font-weight: 400;
    font-size: 13px;
    color: var(--ink);
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}
.dropdown-item:hover, .dropdown-item:focus {
    background: var(--surface-2);
    color: var(--ink);
}
.dropdown-item.active, .dropdown-item:active {
    background: var(--accent-bg);
    color: var(--accent-ink);
    font-weight: 600;
}
.dropdown-item.disabled {
    color: var(--ink-4);
    pointer-events: none;
}
.dropdown-divider {
    height: 0;
    margin: 5px 0;
    overflow: hidden;
    border-top: 1px solid var(--line);
}
.dropdown-header {
    display: block;
    padding: 7px 11px 3px;
    font-size: 11px;
    font-weight: 650;
    color: var(--ink-3);
    letter-spacing: .02em;
}

/* ============================================================
 * 14. 弹窗
 * ============================================================ */
.modal {
    position: fixed;
    top: 0; left: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}
.modal.show { display: block; }
.modal-dialog {
    position: relative;
    width: auto;
    margin: 28px auto;
    max-width: 560px;
    pointer-events: none;
}
.modal.fade .modal-dialog {
    transition: transform .18s ease-out, opacity .18s ease-out;
    transform: translateY(-14px);
    opacity: 0;
}
.modal.show .modal-dialog {
    transform: none;
    opacity: 1;
}
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 56px);
}
.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: var(--surface);
    background-clip: padding-box;
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
    box-shadow: var(--shadow-lg);
    outline: 0;
}
.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    border-top-left-radius: var(--r-panel);
    border-top-right-radius: var(--r-panel);
}
.modal-title {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    color: var(--ink);
    line-height: 1.3;
}
.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 16px 18px;
}
.modal-footer {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    border-bottom-right-radius: var(--r-panel);
    border-bottom-left-radius: var(--r-panel);
}
.modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background-color: rgba(20, 24, 31, .45);
}
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.show { opacity: 1; }
.modal-sm .modal-dialog { max-width: 380px; }
.modal-lg .modal-dialog { max-width: 780px; }
.modal-xl .modal-dialog { max-width: 1080px; }

/* ============================================================
 * 15. 折叠 / 进度条 / 旋转器
 * ============================================================ */
.collapse:not(.show) { display: none; }
.collapsing {
    height: 0;
    overflow: hidden;
    transition: height .25s ease;
}
.navbar-toggler {
    padding: 4px 8px;
    font-size: 16px;
    line-height: 1;
    background: transparent;
    border: 1px solid var(--line-3);
    border-radius: 6px;
    cursor: pointer;
}

.progress {
    display: flex;
    height: 8px;
    overflow: hidden;
    font-size: 10px;
    background: var(--surface-3);
    border-radius: 999px;
}
.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: var(--accent);
    transition: width .3s ease;
}
.progress-bar.bg-success { background: var(--ok); }
.progress-bar.bg-danger  { background: var(--danger); }
.progress-bar.bg-warning { background: var(--warn); }

.spinner-border {
    display: inline-block;
    width: 20px; height: 20px;
    vertical-align: -4px;
    border: 2.5px solid var(--line-3);
    border-right-color: var(--accent);
    border-radius: 50%;
    animation: mes-spin .7s linear infinite;
}
@keyframes mes-spin { to { transform: rotate(360deg); } }

.spinner-grow {
    display: inline-block;
    width: 18px; height: 18px;
    vertical-align: -4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: mes-grow .75s ease-in-out infinite;
}
@keyframes mes-grow { 50% { opacity: 1; } }

/* ============================================================
 * 16. 分页
 * ============================================================ */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    gap: 4px;
}
.page-item .page-link {
    position: relative;
    display: block;
    padding: 5px 11px;
    font-size: 13px;
    color: var(--ink-2);
    background: var(--surface);
    border: 1px solid var(--line-3);
    border-radius: 7px;
    text-decoration: none;
    transition: all .12s ease;
}
.page-item .page-link:hover {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--ink-4);
    z-index: 1;
}
.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}
.page-item.disabled .page-link {
    color: var(--ink-4);
    background: var(--surface-2);
    border-color: var(--line);
    pointer-events: none;
}

/* ============================================================
 * 17. Toast / Placeholder / Tooltip 基础
 * ============================================================ */
.toast {
    width: 320px;
    max-width: 100%;
    font-size: 13px;
    pointer-events: auto;
    background: var(--surface);
    background-clip: padding-box;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    border-radius: 10px;
}
.toast.showing { opacity: 1; }
.toast.show { display: block; opacity: 1; }
.toast.hide { display: none; }
.toast-header {
    display: flex;
    align-items: center;
    padding: 10px 13px;
    color: var(--ink);
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    font-weight: 600;
    font-size: 13px;
}
.toast-body { padding: 12px 13px; word-wrap: break-word; }
.toast-container {
    position: fixed;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
}
.toast-container.top-0.end-0 { top: 14px; right: 14px; }

.placeholder {
    display: inline-block;
    min-height: 1em;
    vertical-align: middle;
    cursor: wait;
    background-color: var(--surface-3);
    border-radius: 4px;
    opacity: .8;
    animation: mes-placeholder 1.4s ease infinite;
}
@keyframes mes-placeholder {
    50% { opacity: .35; }
}

.tooltip {
    position: absolute;
    z-index: 1080;
    display: block;
    margin: 0;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: break-word;
    opacity: 0;
}
.tooltip.show { opacity: 1; }
.tooltip .tooltip-inner {
    max-width: 240px;
    padding: 5px 9px;
    color: #fff;
    text-align: center;
    background-color: #23272f;
    border-radius: 6px;
}

/* ============================================================
 * 18. 打印
 * ============================================================ */
@media print {
    body { background: #fff; }
    .no-print, .mes-topbar, .mes-sidebar, .mes-overlay { display: none !important; }
    .card { border: 1px solid var(--line-3); box-shadow: none; }
    .mes-content { margin: 0 !important; padding: 0 !important; }
}

/* ============================================================
 * 19. 卡片交互（轻微上浮 + 阴影加深，不做刺眼动画）
 * ============================================================ */
/* 小卡片：上浮 2px + 加深阴影 */
.stat-card, .scard, .ck-kpi, .ck-alert, .ck-fresh {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card:hover, .scard:hover, .ck-kpi:hover,
.ck-alert:hover, .ck-fresh:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-3);
}
/* 大容器卡片：只加深阴影、不上浮，避免鼠标划过时整块抖动 */
.card {
    transition: box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--line-3);
}

@media (prefers-reduced-motion: reduce) {
    .stat-card, .scard, .ck-kpi, .ck-alert, .ck-fresh, .card { transition: none; }
    .stat-card:hover, .scard:hover, .ck-kpi:hover,
    .ck-alert:hover, .ck-fresh:hover { transform: none; }
}
