/*
 * 铁勾勾设备租赁运营平台 · Design System V2
 * 以共享页面骨架覆盖列表、表单、详情、报表和弹窗。
 */

:root {
    --ui-primary: #2563eb;
    --ui-primary-hover: #1d4ed8;
    --ui-primary-soft: #eef5ff;
    --ui-accent: #06b6d4;
    --ui-canvas: #f3f6fa;
    --ui-surface: #ffffff;
    --ui-surface-muted: #f7f9fc;
    --ui-ink: #172033;
    --ui-text: #465269;
    --ui-muted: #7a869b;
    --ui-border: #e2e8f0;
    --ui-border-strong: #d4dce8;
    --ui-success: #16a34a;
    --ui-warning: #d97706;
    --ui-danger: #dc2626;
    --ui-radius-sm: 8px;
    --ui-radius-md: 12px;
    --ui-radius-lg: 16px;
    --ui-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 5px 15px rgba(15, 23, 42, .04);
    --ui-shadow-md: 0 12px 34px rgba(15, 23, 42, .08);
}

/* Browser-like workspace tabs */
.app-shell .workspace-tabbar {
    /* 标签栏必须参与内容流；使用 sticky 会在页面滚动时覆盖后面的表单和表格。 */
    position: relative;
    z-index: 2;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    height: 43px;
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #dce4ef;
    background: #f4f7fb;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
    box-sizing: border-box;
}
.app-shell .workspace-tabbar-viewport { min-width: 0; flex: 1; overflow: hidden; }
.app-shell .workspace-tabbar-list { display: flex; width: max-content; min-width: 100%; height: 100%; align-items: flex-end; gap: 3px; padding: 6px 6px 0; box-sizing: border-box; transition: transform .18s ease; }
.app-shell .workspace-page-tab { position: relative; display: flex; min-width: 118px; max-width: 220px; height: 36px; align-items: center; gap: 7px; padding: 0 9px 0 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: #65748b; background: #e9eef5; font-size: 12px; cursor: pointer; box-sizing: border-box; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.app-shell .workspace-page-tab:hover { color: #245fac; background: #eef5ff; }
.app-shell .workspace-page-tab.is-active { height: 37px; color: #1f5fbf; border-color: #d6e1ef; background: #fff; box-shadow: 0 -2px 8px rgba(37, 99, 235, .055); }
.app-shell .workspace-page-tab.is-active:after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ''; background: #fff; }
.app-shell .workspace-page-tab > i:first-child { flex: 0 0 auto; color: #8795a9; font-size: 13px; }
.app-shell .workspace-page-tab.is-active > i:first-child { color: #2563eb; }
.app-shell .workspace-page-tab-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell .workspace-page-tab-close { position: relative; z-index: 1; width: 18px; height: 18px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 50%; color: #8a97a8; background: transparent; font-size: 12px; line-height: 18px; cursor: pointer; }
.app-shell .workspace-page-tab-close:hover { color: #fff; background: #ef4444; }
.app-shell .workspace-tabbar-control { width: 39px; flex: 0 0 auto; padding: 0; border: 0; border-right: 1px solid #dce4ef; color: #66758b; background: #f8fafc; cursor: pointer; }
.app-shell .workspace-tabbar-control:hover { color: #2563eb; background: #eef5ff; }
.app-shell .workspace-tabbar-control:last-child { border-right: 0; border-left: 1px solid #dce4ef; }
.app-shell .workspace-tabbar-close-other { width: auto; min-width: 92px; padding: 0 12px; }
.app-shell .workspace-tabbar-close-other span { margin-left: 4px; font-size: 11px; }
.app-shell .layui-layout-admin > .layui-body { top: 64px !important; }
.app-shell .think-page-body { min-height: calc(100vh - 107px); }

/* Every table operation cell stays on one row, even when the column has no explicit field name. */
.layui-table-view .layui-table-body td:has(> .layui-table-cell > .layui-btn) { min-width: 148px !important; width: 148px !important; }
.layui-table-view .layui-table-body td:has(> .layui-table-cell > .layui-btn) > .layui-table-cell { display: flex !important; min-height: 34px; align-items: center; justify-content: center; flex-wrap: nowrap !important; gap: 3px; overflow: visible !important; white-space: nowrap !important; }
.layui-table-view .layui-table-body td:has(> .layui-table-cell > .layui-btn) > .layui-table-cell > .layui-btn { display: inline-flex; height: 26px; min-width: 0 !important; flex: 0 0 auto; align-items: center; justify-content: center; margin: 0 !important; padding: 0 5px; line-height: 26px; font-size: 10px; white-space: nowrap !important; }

/* 表格正文在列宽不足时自动扩展行高并换行；操作按钮列维持单行。 */
.layui-table-view .layui-table-body td:not(:has(> .layui-table-cell > .layui-btn)) > .layui-table-cell,
.layui-table-view .layui-table-fixed .layui-table-body td:not(:has(> .layui-table-cell > .layui-btn)) > .layui-table-cell {
    height: auto !important;
    min-height: 34px;
    padding-top: 6px;
    padding-bottom: 6px;
    overflow: visible !important;
    line-height: 1.45;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
}
@media (max-width: 1000px) {
    .app-shell .workspace-tabbar-close-other { min-width: 39px; padding: 0; }
    .app-shell .workspace-tabbar-close-other span { display: none; }
}
@media (max-width: 767px) {
    .app-shell .workspace-page-tab { min-width: 106px; max-width: 165px; }
}

/* 保留 ThinkAdmin 主题选项，统一到新的设计变量。 */
.layui-layout-theme-red-1, .layui-layout-theme-red-2 {
    --ui-primary: #e11d48; --ui-primary-hover: #be123c; --ui-primary-soft: #fff1f4; --ui-accent: #f97316;
}
.layui-layout-theme-blue-1, .layui-layout-theme-blue-2 {
    --ui-primary: #1d4ed8; --ui-primary-hover: #1e40af; --ui-primary-soft: #eff6ff; --ui-accent: #0891b2;
}
.layui-layout-theme-green-1, .layui-layout-theme-green-2 {
    --ui-primary: #0f766e; --ui-primary-hover: #115e59; --ui-primary-soft: #ecfdf5; --ui-accent: #16a34a;
}
.layui-layout-theme-black-1, .layui-layout-theme-black-2 {
    --ui-primary: #334155; --ui-primary-hover: #1e293b; --ui-primary-soft: #f1f5f9; --ui-accent: #64748b;
}

html, body { background: var(--ui-canvas); color: var(--ui-text); }
body { font-size: 13px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
::selection { color: var(--ui-ink); background: color-mix(in srgb, var(--ui-primary) 18%, white); }

/* 主框架 */
.app-shell .layui-layout-admin > .layui-side {
    background: linear-gradient(180deg, #0b1739 0%, #0c1b3e 54%, #0a1633 100%) !important;
}
.app-shell .layui-side .layui-logo { border-bottom-color: rgba(255,255,255,.07); }
.app-shell .brand-mark { background: linear-gradient(135deg, var(--ui-primary), var(--ui-accent)); }
.app-shell .layui-logo .headtxt small { color: rgba(202,216,241,.64); }
.app-shell .layui-side-scroll { display: block !important; overflow-x: hidden; }
.app-shell .layui-side-icon { display: none !important; }
.app-shell .layui-side-tree { min-height: calc(100% - 22px); padding: 14px 12px 110px; box-sizing: border-box; background: transparent !important; }
.side-section-label { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 10px 7px; color: #7187ad; font-size: 10px; letter-spacing: .12em; }
.side-section-label span { text-transform: uppercase; }
.side-section-label small { max-width: 118px; overflow: hidden; color: #9db0d0; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0; }
.app-shell .side-menu-tree { width: 100% !important; }
.app-shell .side-menu-tree > .side-menu-group { margin: 4px 0 7px; }
.app-shell .side-menu-tree > .side-menu-group > a { height: 46px; padding: 0 13px !important; line-height: 46px; font-size: 13px; font-weight: 650; }
.app-shell .side-menu-tree > .side-menu-group > a .nav-icon { width: 19px; margin-right: 9px; display: inline-block; text-align: center; font-size: 16px; }
.app-shell .side-menu-tree > .side-menu-group.layui-nav-itemed > a { color: #fff !important; background: rgba(255,255,255,.075) !important; }
.app-shell .side-menu-tree > .side-menu-group > .layui-nav-child { margin: 4px 0 8px; padding: 5px 5px 6px 14px; border-radius: 10px; }
.app-shell .side-menu-tree > .side-menu-group > .layui-nav-child > dd > a { padding-left: 14px !important; }
.app-shell .side-menu-tree .nav-dot { width: 5px; height: 5px; margin-right: 10px; display: inline-block; border-radius: 50%; vertical-align: 2px; background: #607aa8; transition: all .18s ease; }
.app-shell .side-menu-tree .layui-this > a .nav-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.app-shell .side-menu-tree .side-menu-subgroup > a { color: #aebddd !important; font-weight: 600; }
.app-shell .side-menu-tree .side-menu-subgroup > .side-menu-leaves { margin: 2px 0 5px 8px; padding: 2px 0 3px 10px; border-left: 1px solid rgba(143,164,202,.18); border-radius: 0; background: transparent !important; }
.app-shell .side-menu-tree .side-menu-leaves dd > a { height: 35px; padding-left: 12px !important; line-height: 35px; font-size: 11px; }
.app-shell .side-menu-tree .side-menu-leaves .nav-dot { width: 4px; height: 4px; }
.app-shell .layui-layout-left-mini .layui-side-tree { padding-right: 8px; padding-left: 8px; }
.app-shell .layui-layout-left-mini .side-section-label,
.app-shell .layui-layout-left-mini .side-system-status,
.app-shell .layui-layout-left-mini .side-menu-tree .nav-text,
.app-shell .layui-layout-left-mini .side-menu-tree .layui-nav-more,
.app-shell .layui-layout-left-mini .side-menu-tree .layui-nav-child { display: none !important; }
.app-shell .layui-layout-left-mini .side-menu-tree > .side-menu-group > a { padding: 0 !important; text-align: center; }
.app-shell .layui-layout-left-mini .side-menu-tree > .side-menu-group > a .nav-icon { margin: 0; }
.app-shell .layui-side-tree .layui-nav-item > a,
.app-shell .layui-side-tree .layui-nav-child dd > a { padding: 0 13px; }
.app-shell .layui-side-tree .layui-nav-child { margin: 4px 0 7px; padding-left: 9px; background: rgba(1,8,25,.18) !important; border-radius: 9px; }
.app-shell .layui-side-tree .layui-nav-child dd > a { height: 38px; line-height: 38px; font-size: 12px; }
.app-shell .layui-side-tree .layui-nav-more { border-top-color: #7387aa; }
.app-shell .layui-side-tree .layui-nav-itemed > a .layui-nav-more { border-color: transparent transparent #9eb0ce; }
.app-shell .layui-side-tree .layui-this > a,
.app-shell .layui-side-tree .layui-nav-item.layui-this > a {
    background: linear-gradient(90deg, var(--ui-primary), color-mix(in srgb, var(--ui-primary) 74%, var(--ui-accent))) !important;
}
.side-system-status { position: absolute; left: 14px; right: 14px; bottom: 17px; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; color: #b8c6df; background: rgba(255,255,255,.035); }
.side-system-status > i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.12); }
.side-system-status span, .side-system-status strong, .side-system-status small { display: block; }
.side-system-status strong { color: #dce6f7; font-size: 11px; font-weight: 600; }
.side-system-status small { margin-top: 1px; color: #7187ad; font-size: 9px; }

/* Light sidebar navigation · calm neutral surfaces with a single blue accent. */
.app-shell .layui-layout-admin > .layui-side {
    border-right: 1px solid #dfe6f0;
    background: #f7f9fc !important;
    box-shadow: 8px 0 28px rgba(30, 52, 82, .08);
}
.app-shell .layui-side .layui-logo {
    color: #17243a !important;
    border-bottom-color: #e5ebf3;
    background: rgba(255,255,255,.94) !important;
    backdrop-filter: blur(12px);
}
.app-shell .layui-side .layui-logo .headtxt strong { color: #17243a; }
.app-shell .layui-side .layui-logo .headtxt small { color: #7d8ba1; }
.app-shell .layui-side-scroll { background: #f7f9fc !important; }
.app-shell .layui-side-scroll::-webkit-scrollbar { width: 5px; }
.app-shell .layui-side-scroll::-webkit-scrollbar-thumb { border-radius: 99px; background: #cbd5e1; }
.app-shell .layui-side-tree { background: linear-gradient(180deg,#f9fbfd 0%,#f5f8fc 100%) !important; }
.side-section-label { color: #8090a7; }
.side-section-label small { color: #9aa7b8; }
.app-shell .side-menu-tree > .side-menu-group { margin: 5px 0; }
.app-shell .side-menu-tree > .side-menu-group > a {
    color: #34445b !important;
    border: 1px solid transparent;
    background: transparent !important;
}
.app-shell .side-menu-tree > .side-menu-group > a:hover {
    color: #1f5fc5 !important;
    border-color: #dbe7f7;
    background: #eef5ff !important;
}
.app-shell .side-menu-tree > .side-menu-group > a .nav-icon { color: #7185a2; }
.app-shell .side-menu-tree > .side-menu-group.layui-nav-itemed > a {
    color: #1e5fc7 !important;
    border-color: #d6e5fb;
    background: linear-gradient(135deg,#edf5ff,#f6f9ff) !important;
    box-shadow: 0 5px 14px rgba(37,99,235,.08);
}
.app-shell .side-menu-tree > .side-menu-group.layui-nav-itemed > a .nav-icon { color: #2563eb; }
.app-shell .side-menu-tree > .side-menu-group > .layui-nav-child {
    margin: 6px 2px 9px !important;
    padding: 6px 5px 7px 10px !important;
    border: 1px solid #e2e8f1;
    border-radius: 11px;
    background: #f0f4f9 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.app-shell .side-menu-tree .layui-nav-child dd > a {
    color: #56667d !important;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent !important;
}
.app-shell .side-menu-tree .layui-nav-child dd > a:hover {
    color: #1e5fc7 !important;
    border-color: #d9e6f8;
    background: #fff !important;
}
.app-shell .side-menu-tree .layui-nav-child dd.layui-this > a,
.app-shell .side-menu-tree .layui-nav-child dd > a.layui-this {
    color: #fff !important;
    border-color: #2563eb;
    background: linear-gradient(135deg,#2563eb,#3b82f6) !important;
    box-shadow: 0 7px 16px rgba(37,99,235,.22);
}
.app-shell .side-menu-tree .nav-dot { background: #9aa9bd; }
.app-shell .side-menu-tree .layui-this > a .nav-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.app-shell .side-menu-tree .side-menu-subgroup > a { color: #44556e !important; }
.app-shell .side-menu-tree .side-menu-subgroup > .side-menu-leaves {
    border-left-color: #cdd8e7;
    background: transparent !important;
}
.app-shell .side-menu-tree .layui-nav-more { border-top-color: #8190a5; }
.app-shell .side-menu-tree .layui-nav-itemed > a .layui-nav-more { border-color: transparent transparent #2563eb; }
.side-system-status {
    color: #64748b;
    border-color: #dfe7f1;
    background: rgba(255,255,255,.9);
    box-shadow: 0 6px 18px rgba(30,52,82,.06);
}
.side-system-status > i { background: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.side-system-status strong { color: #34445b; }
.side-system-status small { color: #8b99ac; }

.app-shell .layui-layout-admin > .layui-header { border-bottom-color: var(--ui-border); }
.app-shell .layui-header .layui-layout-left { display: flex; align-items: center; max-width: calc(100% - 590px); }
.topbar-context { display: flex !important; min-width: 130px; height: 64px; padding: 0 15px !important; flex-direction: column; justify-content: center; line-height: 1.2 !important; }
.context-eyebrow { margin-bottom: 4px; color: #98a2b3; font-size: 9px; font-weight: 650; letter-spacing: .12em; }
.context-title { display: block; max-width: 150px; overflow: hidden; color: var(--ui-ink); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.topbar-search { display: flex !important; align-items: center; gap: 7px; height: 34px !important; margin-top: 15px; padding: 0 9px 0 12px !important; border: 1px solid var(--ui-border); border-radius: 9px; color: #667085 !important; background: #f8fafc; line-height: 34px !important; cursor: pointer; }
.topbar-search:hover { border-color: color-mix(in srgb, var(--ui-primary) 40%, var(--ui-border)); background: #fff; }
.topbar-search kbd { min-width: 39px; height: 20px; padding: 0 5px; border: 1px solid #d7deea; border-bottom-width: 2px; border-radius: 5px; color: #98a2b3; background: #fff; font: 9px/18px Inter, sans-serif; text-align: center; }
.topbar-action { border-color: var(--ui-border) !important; }
.topbar-action i { color: var(--ui-primary) !important; }
.topbar-icon { color: #667085 !important; background: var(--ui-surface-muted) !important; }
.tenant-badge { color: var(--ui-primary-hover) !important; background: var(--ui-primary-soft) !important; }

/* 通用页面头 */
.think-page-body { min-height: calc(100vh - 64px); box-sizing: border-box; }
.ui-page-card { margin: 0; border-color: var(--ui-border) !important; border-radius: var(--ui-radius-lg) !important; box-shadow: var(--ui-shadow-sm) !important; }
.ui-page-header { display: flex; min-height: 72px; height: auto !important; padding: 12px 20px !important; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--ui-border) !important; box-sizing: border-box; line-height: 1.2 !important; background: linear-gradient(180deg, #fff, #fdfefe); border-radius: var(--ui-radius-lg) var(--ui-radius-lg) 0 0; }
.ui-page-heading { display: flex; min-width: 0; align-items: center; gap: 12px; }
.ui-page-heading-icon { display: inline-flex; width: 38px; height: 38px; flex: 0 0 38px; align-items: center; justify-content: center; border-radius: 10px; color: var(--ui-primary); background: var(--ui-primary-soft); font-size: 17px !important; }
.ui-page-heading-copy { min-width: 0; }
.ui-page-heading-copy strong, .ui-page-heading-copy small { display: block; }
.ui-page-title { overflow: hidden; color: var(--ui-ink); font-size: 16px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.ui-page-heading-copy small { margin-top: 5px; color: #98a2b3; font-size: 10px; font-weight: 400; letter-spacing: .02em; }
.ui-page-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; line-height: normal; }
.ui-page-actions:empty { display: none; }
.ui-page-actions .layui-btn { margin-left: 0 !important; }
.ui-page-content { padding: 18px 20px 22px !important; }
.ui-page-list > .ui-page-content { padding-top: 16px !important; }
.ui-page-card .layui-card-line { display: none; }

/* 筛选与页签 */
.ui-page-card fieldset { min-width: 0; margin: 0 0 16px; padding: 13px 14px 5px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: var(--ui-surface-muted); }
.ui-page-card fieldset legend { padding: 0 8px; color: #667085; font-size: 11px; font-weight: 650; }
.form-search { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 8px; }
.form-search .layui-form-item { margin: 0 !important; }
.form-search .layui-form-label { width: auto; min-width: 66px; height: 36px; padding: 8px 10px; border-color: var(--ui-border); color: #667085; background: #f2f5f9; line-height: 18px; }
.form-search .layui-input-inline { width: 168px; margin: 0; }
.form-search .layui-input, .form-search .layui-select { height: 36px; }
.form-search .layui-btn { height: 36px; line-height: 36px; }
.layui-tab-card { border: 0; box-shadow: none; }
.layui-tab-card > .layui-tab-title { height: 43px; padding: 0 5px; border: 1px solid var(--ui-border); border-radius: 10px 10px 0 0; background: #f8fafc; }
.layui-tab-card > .layui-tab-title li { min-width: 78px; height: 42px; padding: 0 16px; color: #697586; line-height: 42px; }
.layui-tab-card > .layui-tab-title .layui-this { color: var(--ui-primary) !important; font-weight: 650; background: #fff; }
.layui-tab-card > .layui-tab-title .layui-this:after { top: auto; left: 16px; right: 16px; bottom: -1px; width: auto; height: 2px; border: 0; border-radius: 2px; background: var(--ui-primary); }
.layui-tab-card > .layui-tab-content { padding: 16px 0 0; }

/* 表格和批量操作 */
.layui-table-view { margin: 0; border-color: var(--ui-border) !important; border-radius: var(--ui-radius-md) !important; background: #fff; }
.layui-table-view .layui-table-header { border-bottom-color: var(--ui-border); background: #f6f8fb; }
.layui-table-view .layui-table th { height: 44px; color: #667085; background: #f6f8fb; font-size: 12px; font-weight: 650; }
.layui-table-view .layui-table td { height: 46px; color: #344054; border-color: #edf1f5; }
.layui-table-view .layui-table tbody tr:nth-child(even) { background: #fbfcfe; }
.layui-table-view .layui-table tbody tr:hover { background: color-mix(in srgb, var(--ui-primary) 4%, white) !important; }
.layui-table-view .layui-table-fixed { box-shadow: -6px 0 18px rgba(15,23,42,.05); }
.layui-table-tool { min-height: 48px; padding: 7px 12px; border-bottom-color: var(--ui-border); background: #fff; }
.layui-table-page { height: 50px; padding: 9px 12px 0; border-top-color: var(--ui-border); background: #fff; }
.layui-table-page .layui-laypage { float: right; }
.layui-laypage a, .layui-laypage span { border-radius: 6px; }
.layui-laypage .layui-laypage-curr .layui-laypage-em { background: var(--ui-primary); }
.layui-table-cell .layui-btn { height: 28px; padding: 0 10px; border-radius: 6px; line-height: 28px; font-size: 11px; }
.layui-table-cell .layui-btn + .layui-btn { margin-left: 4px; }
.layui-table td.ui-cell-zero { color: #9f1239; background: #fff1f3 !important; }
/* 考勤“假”状态：紫色高亮，与“缺勤”红色明确区分；带 .layui-table-view 前缀以压过 contrast.css 的单元格文字色 */
.layui-table-view .layui-table td.ui-cell-leave { color: #6d28d9; background: #ede9fe !important; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(109, 40, 217, .18); }
.layui-table-sort[lay-sort=asc] .layui-table-sort-asc,
.layui-table-sort[lay-sort=desc] .layui-table-sort-desc { border-bottom-color: var(--ui-primary); border-top-color: var(--ui-primary); }

/* 表单、详情和弹窗 */
.help-label { margin-bottom: 7px; color: #667085; font-size: 11px; }
.help-label b { color: #344054 !important; font-size: 12px; font-weight: 650; }
.layui-form-item { margin-bottom: 17px; }
.layui-input, .layui-select, .layui-textarea { border-color: var(--ui-border-strong) !important; border-radius: var(--ui-radius-sm) !important; background: #fff; }
.layui-input:focus, .layui-select:focus, .layui-textarea:focus { border-color: var(--ui-primary) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-primary) 11%, transparent) !important; }
.layui-input[readonly], .layui-textarea[readonly], .layui-input layui-disabled { color: #667085; background: #f6f8fb; }
.layui-form-select dl dd.layui-this { background: var(--ui-primary); }
.layui-form-radio:hover *, .layui-form-radioed, .layui-form-radioed > i { color: var(--ui-primary); }
.layui-form-checked[lay-skin=primary] i { border-color: var(--ui-primary) !important; background: var(--ui-primary); }
.hr-line-dashed { border-color: var(--ui-border) !important; }
.layui-card > .layui-form-item.text-center:last-child,
.layui-form > .layui-form-item.text-center:last-child { margin: 0; padding: 15px 20px 18px; border-top: 1px solid var(--ui-border); background: #fafbfc; }
.app-full-page { min-height: 100vh; overflow: auto; background: #fff !important; }
.app-full-page .layui-layout-admin > .layui-body { min-height: 100vh; overflow: auto; background: #fff; }
.app-full-page .layui-card { margin: 0; border: 0; border-radius: 0; box-shadow: none !important; }
.app-full-page .layui-card-body { padding: 22px 28px; }
.app-full-page .layui-form > .layui-form-item.text-center:last-child { position: sticky; z-index: 5; bottom: 0; box-shadow: 0 -7px 22px rgba(15,23,42,.05); }
.layui-layer { border: 1px solid rgba(218,225,235,.9); border-radius: 14px !important; }
.layui-layer-title { height: 56px !important; padding-left: 20px !important; border-bottom-color: var(--ui-border) !important; background: #fff !important; line-height: 56px !important; }
.layui-layer-setwin { top: 20px !important; right: 18px !important; }
.layui-layer-btn { padding: 12px 16px 15px !important; border-top: 1px solid var(--ui-border); background: #fafbfc; }
.layui-layer-btn a { height: 34px !important; border-radius: 7px !important; line-height: 34px !important; }
.layui-layer-btn .layui-layer-btn0 { border-color: var(--ui-primary) !important; background: var(--ui-primary) !important; }
.layui-layer-page .layui-layer-content { overflow: auto !important; }

/* 按钮语义 */
.layui-btn { border-radius: var(--ui-radius-sm); }
.layui-btn:not(.layui-btn-primary):not(.layui-btn-danger):not(.layui-btn-warm):not(.layui-btn-disabled) { border-color: var(--ui-primary); background: var(--ui-primary); }
.layui-btn-normal { border-color: var(--ui-primary) !important; background: var(--ui-primary) !important; }
.layui-btn-primary { border-color: var(--ui-border-strong) !important; color: #475467 !important; background: #fff !important; }
.layui-btn-primary:hover { border-color: var(--ui-primary) !important; color: var(--ui-primary) !important; background: var(--ui-primary-soft) !important; }
.layui-btn-danger { border-color: #ef4444 !important; background: #ef4444 !important; }
.layui-btn-warm { border-color: #f59e0b !important; background: #f59e0b !important; }
.layui-btn i { font-size: 13px; }

/* 卡片、提示、空状态 */
.think-box-shadow { border-color: var(--ui-border) !important; border-radius: var(--ui-radius-md) !important; box-shadow: var(--ui-shadow-sm) !important; }
.layui-elem-quote { border-left-color: var(--ui-primary); border-radius: 0 var(--ui-radius-sm) var(--ui-radius-sm) 0; background: var(--ui-primary-soft); }
.layui-badge, .layui-badge-rim { border-radius: 999px; }
.layui-timeline-axis { color: var(--ui-primary); }
.layui-table-view .layui-none { min-height: 160px; padding-top: 86px; color: #98a2b3; background: linear-gradient(180deg, #fff, #fbfcfe); }
.layui-table-view .layui-none:before { content: '\e63a'; position: absolute; left: 50%; margin: -45px 0 0 -19px; color: #c8d1df; font-family: layui-icon; font-size: 38px; }

/* 全局快捷导航 */
.quick-nav { position: fixed; z-index: 999999; inset: 0; display: none; align-items: flex-start; justify-content: center; padding-top: min(16vh, 140px); }
.quick-nav.is-open { display: flex; }
.quick-nav-backdrop { position: absolute; inset: 0; background: rgba(8,15,31,.52); backdrop-filter: blur(4px); }
.quick-nav-panel { position: relative; width: min(620px, calc(100vw - 32px)); max-height: min(650px, 72vh); overflow: hidden; border: 1px solid rgba(255,255,255,.75); border-radius: 16px; background: #fff; box-shadow: 0 30px 90px rgba(2,8,23,.32); }
.quick-nav-search { display: flex; height: 64px; padding: 0 17px; align-items: center; gap: 12px; border-bottom: 1px solid var(--ui-border); }
.quick-nav-search > i { color: var(--ui-primary); font-size: 21px; }
.quick-nav-search input { min-width: 0; height: 100%; flex: 1; border: 0; outline: 0; color: var(--ui-ink); background: transparent; font-size: 15px; }
.quick-nav-search input::placeholder { color: #a1a9b7; }
.quick-nav-search kbd { padding: 3px 7px; border: 1px solid var(--ui-border-strong); border-bottom-width: 2px; border-radius: 6px; color: #98a2b3; background: #f8fafc; font-size: 9px; }
.quick-nav-hint { padding: 13px 18px 8px; color: #667085; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.quick-nav-hint span { color: #a0a8b5; font-weight: 400; letter-spacing: 0; }
.quick-nav-results { max-height: calc(min(650px, 72vh) - 118px); padding: 4px 9px 12px; overflow-y: auto; }
.quick-nav-item { display: flex; width: 100%; min-height: 50px; padding: 8px 11px; align-items: center; gap: 11px; border: 0; border-radius: 9px; color: #344054; background: transparent; text-align: left; cursor: pointer; }
.quick-nav-item:hover, .quick-nav-item.is-active { color: var(--ui-primary); background: var(--ui-primary-soft); }
.quick-nav-item > i { display: inline-flex; width: 30px; height: 30px; flex: 0 0 30px; align-items: center; justify-content: center; border-radius: 8px; color: var(--ui-primary); background: #fff; box-shadow: 0 1px 4px rgba(15,23,42,.08); }
.quick-nav-item span { display: block; min-width: 0; flex: 1; }
.quick-nav-item strong, .quick-nav-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-nav-item strong { font-size: 13px; }
.quick-nav-item small { margin-top: 2px; color: #98a2b3; font-size: 10px; font-weight: 400; }
.quick-nav-item > em { color: #b0b8c5; font-style: normal; }
.quick-nav-empty { display: none; min-height: 180px; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #98a2b3; }
.quick-nav-empty i { font-size: 32px; }
.quick-nav-empty.is-visible { display: flex; }
body.quick-nav-open { overflow: hidden; }

@media (max-width: 1450px) {
    .app-shell .layui-header .layui-layout-left { max-width: calc(100% - 520px); }
    .app-shell .layui-header .layui-layout-left > .layui-nav-item:not(:first-child):not(.topbar-context) { display: none; }
    .topbar-search span { display: none; }
}

@media (max-width: 980px) {
    .topbar-search kbd, .side-system-status { display: none; }
    .app-shell .layui-side-tree { padding-bottom: 30px; }
    .ui-page-header { align-items: flex-start; flex-direction: column; gap: 10px; }
    .ui-page-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .form-search .layui-form-item { display: flex; }
}

@media (max-width: 767px) {
    .ui-page-card { border-radius: 12px !important; }
    .ui-page-header { min-height: 66px; padding: 12px 14px !important; }
    .ui-page-heading-icon { width: 34px; height: 34px; flex-basis: 34px; }
    .ui-page-title { font-size: 15px; }
    .ui-page-content { padding: 12px !important; }
    .ui-page-card fieldset { padding: 10px 10px 2px; }
    .form-search { display: block; }
    .form-search .layui-form-item { width: 100%; margin-bottom: 8px !important; }
    .form-search .layui-input-inline { min-width: 0; width: auto; flex: 1; }
    .form-search .layui-form-item:last-child .layui-btn { width: 100%; }
    .layui-tab-card > .layui-tab-title { overflow-x: auto; white-space: nowrap; }
    .layui-tab-card > .layui-tab-title li { min-width: auto; padding: 0 12px; }
    .layui-table-page .layui-laypage { float: none; }
    .app-full-page .layui-card-body { padding: 16px; }
    .quick-nav { padding-top: 24px; }
    .quick-nav-panel { max-height: calc(100vh - 48px); }
    .quick-nav-results { max-height: calc(100vh - 165px); }
}

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

/* The tab strip is in the body flow, so it can never cover the loaded page. */
.app-shell .layui-layout-admin > .layui-body { top: 64px !important; }
.app-shell .think-page-body { min-height: calc(100vh - 107px); }
