/* ------------------------------------------------------------------
 * SysDeck 控制台样式（layuiAdmin 风格 · 默认深色 · 保留 Layui 自定义主题色）
 * 基础 UI 库：Layui 2.13.9（layui.css 先于本文件加载）
 * 布局沿用 layuiAdmin 的「左侧深色菜单 + 顶栏 + 内容区 + 工作区标签」结构，
 * 组件外观贴近 Layui 规范，配色为深色皮肤：
 *   - 背景 #1b1e23，面板 #23262e，主色 #16baaa（Layui 默认主题色，可整体替换）
 *   - 语义色：成功 #5fb878 / 警告 #ffb800 / 危险 #ff5722
 * ------------------------------------------------------------------ */

:root {
    --bg: #1b1e23;
    --bg-soft: #1f2228;
    --panel: #23262e;
    --panel-2: #2a2e37;
    --panel-3: #31363f;
    --line: #343944;
    --line-soft: #2b303a;
    --text: #d6dae1;
    --muted: #a0a6b1;
    --muted-2: #7c8290;
    --accent: #16baaa;
    --accent-2: #4bd0c2;
    --accent-soft: rgba(22, 186, 170, .14);
    --cyan: #2f9688;
    --ok: #5fb878;
    --warn: #ffb800;
    --danger: #ff5722;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
    --radius: 3px;
    --radius-lg: 6px;
    --shadow: 0 1px 4px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

.boot {
    display: flex; align-items: center; justify-content: center;
    height: 100vh; color: var(--muted-2); letter-spacing: .08em; background: var(--bg);
}

/* ---------------- 登录页 ---------------- */
.login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(1000px 520px at 12% 0%, rgba(22, 186, 170, .10), transparent 62%),
        radial-gradient(760px 460px at 100% 100%, rgba(47, 150, 136, .08), transparent 60%),
        var(--bg);
    padding: 32px 20px;
}
.login-card {
    width: 100%; max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 34px 32px 26px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.brand-mark {
    width: 44px; height: 44px; border-radius: 5px;
    display: grid; place-items: center;
    background: linear-gradient(140deg, #16baaa, #2f9688);
    color: #fff;
    font-family: var(--mono); font-weight: 700; font-size: 16px; letter-spacing: .02em;
    box-shadow: 0 6px 16px rgba(22, 186, 170, .3);
}
.brand-title { font-size: 20px; font-weight: 600; letter-spacing: .01em; color: #e9ebef; }
.brand-sub { color: var(--muted-2); font-size: 12.5px; margin-top: 3px; letter-spacing: .04em; }

.login-form .field { margin-bottom: 16px; }
.login-form .btn { width: 100%; justify-content: center; height: 40px; margin-top: 6px; }
.login-error {
    color: #ffb3a7; background: rgba(255, 87, 34, .1);
    border: 1px solid rgba(255, 87, 34, .35);
    padding: 9px 12px; border-radius: var(--radius); font-size: 13px; margin-bottom: 14px;
}
.login-foot { margin-top: 22px; color: var(--muted-2); font-size: 12px; display: flex; justify-content: space-between; }

/* ---------------- 布局（layuiAdmin 结构） ---------------- */
.shell { display: flex; min-height: 100vh; background: var(--bg); }
.sidebar {
    width: 220px; flex: 0 0 220px;
    background: #20222a;
    border-right: 1px solid #16181e;
    padding: 0 0 12px;
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
}
.brand-row {
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px; height: 56px; flex: 0 0 56px;
    background: #20222a; border-bottom: 1px solid #16181e;
}
.brand-row .brand-mark { width: 30px; height: 30px; border-radius: 4px; font-size: 12px; box-shadow: none; }
.brand-row .brand-title { font-size: 15px; color: #e6e8ec; }
.brand-row .brand-sub { font-size: 11px; color: #868b95; }

.nav-label {
    color: #6f747e; font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; padding: 14px 22px 8px;
}
.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.nav-item {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 14px; border-radius: 2px;
    color: #bfc4cc; font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s;
    cursor: pointer;
}
.nav-item:hover { background: #2b2e38; color: #fff; }
.nav-item.active {
    background: #2b2e38; color: var(--accent-2);
    border-left-color: var(--accent);
}
.nav-item .nav-icon { width: 16px; height: 16px; flex: 0 0 16px; font-size: 16px; line-height: 16px; opacity: .9; }
.sidebar-foot { margin-top: auto; padding: 12px 16px 0; color: #7b818b; font-size: 11.5px; line-height: 1.7; }
.sidebar-foot .ver { font-family: var(--mono); color: #9aa0aa; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
    height: 56px; flex: 0 0 56px;
    display: flex; align-items: center; gap: 14px;
    padding: 0 18px;
    border-bottom: 1px solid #16181e;
    background: #20222a;
    position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 15.5px; font-weight: 600; margin: 0; color: #e9ebef; }
.topbar .crumb { color: #838894; font-size: 12px; margin-left: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mode-badge {
    font-size: 11.5px; color: var(--accent-2); border: 1px solid rgba(22, 186, 170, .3);
    background: rgba(22, 186, 170, .1); padding: 3px 9px; border-radius: 2px;
    font-family: var(--mono);
}
.user-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 8px 4px 4px; border-radius: 2px;
    border: 1px solid var(--line); background: var(--panel);
}
.avatar {
    width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(140deg, #16baaa, #2f9688);
    color: #fff;
    font-size: 12px; font-weight: 600;
}
.user-meta { line-height: 1.25; }
.user-name { font-size: 12.5px; color: var(--text); }
.user-role { font-size: 10.5px; color: var(--muted-2); letter-spacing: .06em; }
.icon-btn {
    width: 30px; height: 30px; display: grid; place-items: center;
    border-radius: 2px; border: 1px solid transparent; background: transparent;
    color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); color: var(--accent-2); }

.content { padding: 14px 16px 20px; overflow-x: hidden; flex: 1; }
.page-pane { min-width: 0; }

/* ---------------- 工作区标签页 ---------------- */
.workspace-tabs {
    display: flex; align-items: center; gap: 4px;
    padding: 0 16px; overflow-x: auto;
    background: #191b20;
    border-bottom: 1px solid #16181e;
    flex: 0 0 auto;
}
.workspace-tab {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 10px 10px 13px; border: 1px solid transparent;
    border-bottom: none; border-radius: 2px 2px 0 0;
    color: var(--muted); cursor: pointer; white-space: nowrap;
    font-size: 12.5px; user-select: none;
}
.workspace-tab:hover { color: var(--text); background: #23262e; }
.workspace-tab.active {
    color: var(--accent-2); background: var(--bg);
    border-color: #2c313b; border-bottom: 1px solid var(--bg);
    font-weight: 600;
}
.workspace-tab-label { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.workspace-tab-close {
    width: 16px; height: 16px; display: grid; place-items: center;
    border: 0; border-radius: 50%; background: transparent; color: var(--muted-2);
    cursor: pointer; font-size: 14px; line-height: 1;
}
.workspace-tab-close:hover { color: #fff; background: var(--danger); }
.workspace-tab-close:disabled { opacity: .25; cursor: not-allowed; }

.workspace-tab.pinned { padding-left: 10px; }
.workspace-tab-pin {
    color: var(--accent); font-size: 11px; line-height: 1; flex: 0 0 auto;
}
.workspace-tab-close-all {
    flex: 0 0 auto; margin-left: auto; padding: 4px 10px;
    border: 1px solid var(--line); border-radius: 2px;
    background: transparent; color: var(--muted); cursor: pointer;
    font-size: 12px; white-space: nowrap;
}
.workspace-tab-close-all:hover { color: #ffb3a7; border-color: rgba(255, 87, 34, .38); background: rgba(255, 87, 34, .1); }

.tab-context-menu {
    position: fixed; z-index: 10000; min-width: 168px;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 2px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
    padding: 4px; user-select: none;
}
.tab-menu-item {
    padding: 7px 12px; border-radius: 2px; color: var(--text);
    font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.tab-menu-item:hover { background: var(--accent-soft); color: var(--accent-2); }

/* ---------------- 通用组件 ---------------- */
.card, .panel {
    background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
}
.panel { padding: 16px 18px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-title { font-size: 14px; font-weight: 600; color: #e6e8ec; }
.panel-sub { color: var(--muted-2); font-size: 12px; }
.panel-head .spacer { flex: 1; }

.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.page-head h2 { margin: 0; font-size: 19px; font-weight: 600; color: #e9ebef; }
.page-head p { margin: 5px 0 0; color: var(--muted-2); font-size: 12.5px; }
.page-head .spacer { flex: 1; }

/* 按钮：对齐 layui-btn（34px 高 / 圆角 2px / 主色 #16baaa） */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 14px;
    border-radius: 2px; border: 1px solid var(--line);
    background: var(--panel-2); color: var(--text);
    cursor: pointer; font-size: 13px; white-space: nowrap;
    transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent-2); background: var(--panel-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; border-color: var(--line); color: var(--muted-2); background: var(--panel-2); }
.btn-primary {
    background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-primary:hover { background: #21c4b4; border-color: #21c4b4; color: #fff; }
.btn-accent { background: rgba(22, 186, 170, .10); border-color: rgba(22, 186, 170, .45); color: #7fe7dd; }
.btn-accent:hover { background: rgba(22, 186, 170, .18); border-color: #16baaa; color: #b2fff7; }
.btn-danger { background: rgba(255, 87, 34, .12); border-color: rgba(255, 87, 34, .4); color: #ffb3a7; }
.btn-danger:hover { background: rgba(255, 87, 34, .2); border-color: var(--danger); color: #ffd0c6; }
.btn-warn { background: rgba(255, 184, 0, .12); border-color: rgba(255, 184, 0, .4); color: #ffd98a; }
.btn-warn:hover { background: rgba(255, 184, 0, .2); border-color: #ffb800; color: #ffe7b0; }
.btn-success { background: rgba(125, 220, 146, .12); border-color: rgba(125, 220, 146, .4); color: #a6efb5; }
.btn-success:hover { background: rgba(125, 220, 146, .2); border-color: #7ddc92; color: #c8f7d1; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { color: var(--muted); font-size: 12.5px; line-height: 1.5; letter-spacing: .01em; }
/* 输入框：参考 AdminUI 表单，统一 36px 高度、轻圆角与克制的暗色边框 */
.input, .select, .textarea {
    width: 100%; background: #1a1e25; color: var(--text);
    border: 1px solid #333a45; border-radius: 4px;
    padding: 0 12px; height: 36px; outline: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.input:hover, .select:hover, .textarea:hover { border-color: #414a58; }
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--accent); background: #1d2229;
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder, .textarea::placeholder { color: #6f7581; }
.textarea {
    resize: vertical; min-height: 96px; height: auto; padding: 10px 12px;
    font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
}
.select {
    cursor: pointer; padding-right: 34px !important;
    min-width: 84px;
    appearance: none; -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #8b95a3 50%),
                      linear-gradient(135deg, #8b95a3 50%, transparent 50%) !important;
    background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50% !important;
    background-size: 5px 5px, 5px 5px !important;
    background-repeat: no-repeat !important;
}
select.select[data-role$="-size"], #audit-size, #svc-page-size { min-width: 96px; }
.select:disabled { opacity: .55; cursor: not-allowed; }
/* 弹窗内表单：标签左栏、控件右栏，和 AdminUI 表单组合一致 */
.sd-form { display: flex; flex-direction: column; gap: 15px; }
.sd-form > .field {
    display: grid; grid-template-columns: 148px minmax(0, 1fr);
    align-items: center; gap: 16px;
}
.sd-form > .field > label { text-align: right; color: var(--muted); }
.sd-form > .field > .input,
.sd-form > .field > .select,
.sd-form > .field > .combo { min-width: 0; }
.sd-form > .field > .hint { grid-column: 2; margin-top: -3px; }
.sd-form > .sd-form-check { margin-left: 164px; color: var(--muted); font-size: 12.5px; cursor: pointer; }

/* 可输入模糊筛选下拉框：原生 select 隐藏，input + 浮层菜单承担交互 */
.combo { position: relative; display: inline-block; min-width: 150px; vertical-align: middle; }
.combo > select { display: none !important; }
.combo > .combo-input {
    width: 100%;
    padding-right: 28px;
    cursor: text;
    background-image: linear-gradient(45deg, transparent 50%, #8b919c 50%),
                      linear-gradient(135deg, #8b919c 50%, transparent 50%);
    background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.combo.open > .combo-input { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.combo-menu {
    position: absolute; z-index: 1200; left: 0; right: 0; top: calc(100% + 4px);
    display: none; max-height: 260px; overflow-y: auto;
    padding: 4px; border: 1px solid var(--line); border-radius: 2px;
    background: var(--panel-2); box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
}
.combo.open > .combo-menu { display: block; }
.combo-option {
    padding: 7px 9px; border-radius: 2px; color: var(--text); cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.combo-option:hover, .combo-option.active { background: var(--accent-soft); color: var(--accent-2); }
.combo-empty { padding: 9px; color: var(--muted-2); font-size: 12px; }

.toolbar {
    display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 14px;
    background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.toolbar .field { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; }
.toolbar .field label { white-space: nowrap; }
.toolbar .input, .toolbar .select { width: auto; max-width: 100%; height: 32px; }
.toolbar .spacer { flex: 1; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line-soft); border-radius: var(--radius);
    padding: 14px 16px; position: relative; overflow: hidden;
    box-shadow: var(--shadow);
}
.stat::after {
    content: ""; position: absolute; inset: 0 auto auto 0; height: 2px; width: 100%;
    background: linear-gradient(90deg, var(--accent), transparent 70%); opacity: .45;
}
.stat .stat-label { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.stat .stat-value { font-size: 26px; font-weight: 600; margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: #eef1f5; }
.stat .stat-value small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.stat .stat-foot { color: var(--muted-2); font-size: 11.5px; margin-top: 7px; display: flex; justify-content: space-between; }
.bar { height: 5px; border-radius: 3px; background: #1a1d23; overflow: hidden; margin-top: 10px; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), #5fb878); }
.bar.warn > span { background: linear-gradient(90deg, #ffb800, #ffd666); }
.bar.danger > span { background: linear-gradient(90deg, #ff5722, #ff8a65); }
/* 磁盘使用率：<70% 绿、70-85% 琥珀、>=85% 红，与进度条阈值一致 */
.pct-value { color: #7ddc92; font-variant-numeric: tabular-nums; }
.pct-value.warn { color: #ffc46b; }
.pct-value.danger { color: #ff7b5f; }
.stat .stat-value.pct-value { color: #7ddc92; }
.stat .stat-value.pct-value.warn { color: #ffc46b; }
.stat .stat-value.pct-value.danger { color: #ff7b5f; }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }

/* 徽章：轻底色 + 语义色圆点 */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 8px; border-radius: 2px; font-size: 11.5px;
    border: 1px solid var(--line); color: var(--muted); background: var(--panel-2);
    white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
/* 角色名称与“内置”标识之间留出间距 */
.badge.role-builtin { margin-left: 8px; }
.badge.ok { color: #9fe0b5; border-color: rgba(95, 184, 120, .35); background: rgba(95, 184, 120, .12); }
.badge.ok::before { background: var(--ok); }
.badge.fail { color: #ffb3a7; border-color: rgba(255, 87, 34, .38); background: rgba(255, 87, 34, .1); }
.badge.fail::before { background: var(--danger); }
.badge.warn { color: #ffdd8a; border-color: rgba(255, 184, 0, .35); background: rgba(255, 184, 0, .1); }
.badge.warn::before { background: var(--warn); }
.badge.muted::before { background: var(--muted-2); }

/* 表格：对齐 layui-table（深色皮肤） */
.table-wrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
    text-align: left; font-weight: 600; color: #b9bfc9;
    padding: 10px 12px; background: #262a33; border-bottom: 1px solid var(--line);
    white-space: nowrap; font-size: 12.5px; letter-spacing: .02em;
}
td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(22, 186, 170, .06); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }

.empty {
    padding: 42px 20px; text-align: center; color: var(--muted-2);
    border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .02);
}
.empty strong { display: block; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.loading { padding: 36px; text-align: center; color: var(--muted-2); }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 16px; font-size: 12.8px; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--text); word-break: break-all; font-family: var(--mono); font-size: 12.3px; }

.tabs { display: flex; gap: 2px; padding: 3px; background: #1d2026; border: 1px solid var(--line-soft); border-radius: 2px; width: fit-content; margin-bottom: 16px; }
.tab {
    padding: 6px 14px; border-radius: 2px; border: 1px solid transparent;
    color: var(--muted); cursor: pointer; font-size: 12.5px; background: transparent;
}
.tab:hover { color: var(--accent-2); }
.tab.active { background: var(--panel-2); color: var(--accent-2); border-color: var(--line); font-weight: 600; }

/* ---------------- 日志（终端风格） ---------------- */
.log-toolbar { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.log-toolbar .field { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; }
.log-toolbar .field label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.log-toolbar .input, .log-toolbar .select { width: auto; max-width: 100%; height: 32px; }
.log-view {
    height: calc(100vh - 300px); min-height: 320px; overflow: auto;
    background: #14161a; border: 1px solid #101216; border-radius: var(--radius);
    font-family: var(--mono); font-size: 12.3px; line-height: 1.65;
    padding: 12px 14px;
}
.log-line { white-space: pre-wrap; word-break: break-all; color: #c3ccd8; }
.log-line.err { color: #ff9a8b; }
.log-line.warn { color: #ffd166; }
.log-line.info { color: #9fc2de; }
.log-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.log-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.log-status.live .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(95, 184, 120, .18); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* 日志文件浏览 */
.log-subbar { padding: 0; border: none; background: transparent; margin-bottom: 10px; }
.inline-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted-2); }
.binding-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.binding-chip {
    display: inline-flex; align-items: center; border: 1px solid var(--line);
    border-radius: 2px; background: var(--panel-2); overflow: hidden;
}
.chip-open {
    border: 0; background: transparent; color: var(--accent-2); cursor: pointer;
    font-size: 12px; padding: 5px 10px; max-width: 220px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip-open:hover { color: #fff; background: var(--accent-soft); }
.chip-x {
    border: 0; border-left: 1px solid var(--line); background: transparent;
    color: var(--muted-2); cursor: pointer; padding: 5px 8px; font-size: 12px;
}
.chip-x:hover { color: #ffb3a7; background: rgba(255, 87, 34, .12); }
.crumb { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.crumb-path {
    color: #a9b4c4; word-break: break-all; padding: 6px 10px;
    background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 2px;
}
.file-list {
    border: 1px solid var(--line-soft); border-radius: var(--radius);
    background: var(--panel); overflow: hidden; margin-bottom: 14px;
}
.file-entry {
    display: flex; align-items: center; gap: 12px; padding: 9px 14px;
    border-bottom: 1px solid var(--line-soft); cursor: pointer;
}
.file-entry:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.file-entry:last-child { border-bottom: none; }
.file-entry:hover { background: rgba(22, 186, 170, .06); }
.file-kind {
    flex: 0 0 auto; font-size: 11px; color: var(--muted); border: 1px solid var(--line);
    border-radius: 2px; padding: 1px 7px; background: var(--panel-2);
}
.file-kind.dir { color: var(--accent-2); border-color: rgba(22, 186, 170, .35); background: rgba(22, 186, 170, .12); }
.file-main { flex: 1; min-width: 0; }
.file-name { font-size: 12.8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }
.file-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.path-box {
    flex: 1; min-width: 200px; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; font-size: 12px; color: #a9b4c4;
    padding: 6px 10px; background: #1d2026; border: 1px solid var(--line); border-radius: 2px;
}
.file-log-view { height: calc(100vh - 460px); min-height: 300px; }

.chart-box { position: relative; height: 210px; width: 100%; }
.chart-box canvas { display: block; width: 100%; height: 100%; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }

.code-output {
    margin: 0; padding: 12px 14px; min-height: 70px; max-height: 320px; overflow: auto;
    background: #14161a; border: 1px solid var(--line); border-radius: 2px;
    font-family: var(--mono); font-size: 12.3px; line-height: 1.65; color: #c3ccd8;
    white-space: pre-wrap; word-break: break-all;
}
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.pager .layui-laypage,
.layui-table-page .layui-laypage { margin: 0; }
.pager .layui-laypage a,
.pager .layui-laypage span,
.pager .layui-laypage button,
.pager .layui-laypage input,
.layui-table-page .layui-laypage a,
.layui-table-page .layui-laypage span,
.layui-table-page .layui-laypage button,
.layui-table-page .layui-laypage input {
    background: #20252d !important; border: 1px solid #2b323d !important; color: #aab4c1 !important;
}
.pager .layui-laypage a:hover,
.layui-table-page .layui-laypage a:hover { color: #16baaa !important; }
.pager .layui-laypage .layui-laypage-curr .layui-laypage-em,
.layui-table-page .layui-laypage .layui-laypage-curr .layui-laypage-em { background-color: #16baaa !important; }
.pager .layui-laypage .layui-laypage-curr em,
.layui-table-page .layui-laypage .layui-laypage-curr em { color: #fff !important; }
.pager .layui-laypage .layui-laypage-skip,
.layui-table-page .layui-laypage .layui-laypage-skip { color: #8d99a8 !important; }

/* ---------------- 弹层（layui-layer 深色皮肤） ---------------- */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0, 0, 0, .55);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
    width: min(720px, 94vw); max-height: 88vh; overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: 0 16px 46px rgba(0, 0, 0, .55);
    display: flex; flex-direction: column;
    animation: none;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.modal-head { padding: 13px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; background: #262a33; }
.modal-title { font-size: 14.5px; font-weight: 600; color: #e6e8ec; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* layui-layer 深色皮肤（确认框等） */
.layui-layer { background: var(--panel); color: var(--text); border-radius: var(--radius-lg); box-shadow: 0 16px 46px rgba(0, 0, 0, .55); }
.layui-layer-title { background: #262a33 !important; color: #e6e8ec !important; border-bottom: 1px solid var(--line); }
.layui-layer-content { color: var(--text); }
.layui-layer-btn .layui-layer-btn0 { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }
.layui-layer-btn a { background: var(--panel-2); border-color: var(--line); color: var(--text); border-radius: 2px; }
.layui-layer-btn a:hover { border-color: var(--accent); color: var(--accent-2); }
.layui-layer-btn .layui-btn-danger { background: rgba(255, 87, 34, .16) !important; border-color: rgba(255, 87, 34, .45) !important; color: #ffb3a7 !important; }
.layui-layer-close { color: var(--muted); }

.toast-wrap {
    position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
    z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px;
    pointer-events: none; width: max-content; max-width: min(520px, calc(100vw - 32px));
}
.toast-clear {
    pointer-events: auto; border: 1px solid var(--line); background: var(--panel);
    color: var(--muted); border-radius: 2px; padding: 3px 10px; font-size: 11.5px;
    cursor: pointer; align-self: center;
}
.toast-clear:hover { color: #ffb3a7; border-color: rgba(255, 87, 34, .4); }
.toast {
    pointer-events: auto;
    padding: 10px 16px; border-radius: 2px; font-size: 12.8px;
    background: #262a33;
    border: 1px solid var(--line); border-left: 3px solid var(--accent);
    color: var(--text);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
    animation: toast-in .18s ease-out;
    max-width: 100%; width: max-content;
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); color: #ffb3a7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.hint {
    font-size: 12px; color: var(--muted); line-height: 1.7;
    background: rgba(22, 186, 170, .08); border: 1px solid rgba(22, 186, 170, .22);
    border-radius: 2px; padding: 9px 12px;
}
.hint.warn { color: #ffdd8a; background: rgba(255, 184, 0, .08); border-color: rgba(255, 184, 0, .24); }

.section-title { font-size: 12px; color: var(--muted-2); letter-spacing: .06em; text-transform: uppercase; margin: 18px 0 9px; }
.section-title:first-child { margin-top: 0; }

/* 服务列表：8 列紧凑布局，一屏显示不出现水平滚动条 */
.svc-table { table-layout: fixed; width: 100%; }
.svc-table th:nth-child(1) { width: 27%; }
.svc-table th:nth-child(2) { width: 9%; }
.svc-table th:nth-child(3) { width: 9%; }
.svc-table th:nth-child(4) { width: 8%; }
.svc-table th:nth-child(5) { width: 8%; }
.svc-table th:nth-child(6) { width: 11%; }
.svc-table th:nth-child(7) { width: 12%; }
.svc-table th:nth-child(8) { width: 16%; }
.svc-table th[data-sort] { cursor: pointer; user-select: none; }
.svc-table th[data-sort]:hover { color: var(--accent-2); }
.svc-name-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pin-btn {
    flex: 0 0 auto; width: 22px; height: 22px; padding: 0;
    border: 0; border-radius: 2px; background: transparent;
    color: #6d7381; cursor: pointer; font-size: 16px; line-height: 1;
}
.pin-btn:hover { background: var(--accent-soft); color: var(--warn); }
.pin-btn.active { color: var(--warn); }
.svc-name-cell { overflow: hidden; }
.svc-name {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--accent-2); font-size: 12.8px;
}
.svc-sub {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 11.5px; line-height: 1.4; margin-top: 2px; color: var(--muted-2);
}
.svc-table td, .svc-table th { padding: 8px 8px; }
.svc-table td:first-child { overflow: hidden; }
.svc-table .btn-sm { padding: 3px 8px; font-size: 12px; }
.svc-ports { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; font-size: 12px; }
.svc-ops { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.svc-ops .icon-btn {
    display: inline-grid; place-items: center;
    width: 24px; height: 24px; font-size: 12px; border-radius: 2px;
    vertical-align: middle; margin-left: 0;
}
.svc-ops .icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.svc-ops .icon-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-2); }
.svc-link { background: none; border: 0; padding: 0; color: var(--accent-2); cursor: pointer; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-link:hover { text-decoration: underline; }
.svc-auto { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.list-tools { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 8px 0; }
.list-tools .field { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; }
.list-tools .field label { white-space: nowrap; }
.list-tools .input, .list-tools .select { width: auto; max-width: 100%; height: 32px; }
.list-tools .spacer { flex: 1; }
.log-view mark { background: rgba(255, 184, 0, .35); color: #ffeab0; border-radius: 2px; padding: 0 1px; }
.pager .btn:disabled { opacity: .4; cursor: not-allowed; }

/* 服务详情：基本信息与服务描述卡片等高 */
.detail-top .panel { display: flex; flex-direction: column; }
.detail-top .detail-basic .kv { flex: 1 1 auto; }
.detail-top .detail-desc-panel .textarea { flex: 1 1 auto; }

/* 整行可点击（单一操作场景） */
.svc-row { cursor: pointer; transition: background .12s ease; }
.svc-row:hover { background: var(--panel-2); }

/* 文件选择器（目录 / ZIP 上传）：替换浏览器默认浅灰按钮，统一深色 */
input[type="file"] {
    padding: 3px 8px; height: 34px; color: var(--muted);
    background: #1d2026; border: 1px solid var(--line); border-radius: 2px;
    font-size: 12.5px;
}
input[type="file"]::file-selector-button {
    margin-right: 10px; padding: 4px 12px;
    border: 1px solid var(--line); border-radius: 2px;
    background: var(--panel-2); color: var(--text);
    font-size: 12.5px; cursor: pointer;
}
input[type="file"]::file-selector-button:hover {
    border-color: var(--accent); color: var(--accent-2); background: var(--panel-3);
}
/* 滚动条：细窄、深色、不刺眼（Windows 下避免出现宽条、白边与箭头） */
* { scrollbar-width: thin; scrollbar-color: #3a3f4a #171a21; }
:root { color-scheme: dark; }
/* html 上显式声明，避免 Chrome 叠加滚动条时在右缘画 1px 系统浅色边 */
html { scrollbar-color: #3a3f4a #171a21 !important; }
::-webkit-scrollbar { width: 8px; height: 8px; background: #171a21 !important; border: 0 !important; }
::-webkit-scrollbar-track,
::-webkit-scrollbar-track-piece { background: #171a21 !important; border: 0 !important; box-shadow: none !important; }
::-webkit-scrollbar-thumb { background: #3a3f4a !important; border-radius: 4px; border: 0 !important; }
::-webkit-scrollbar-thumb:hover { background: #4a505c !important; }
::-webkit-scrollbar-button { display: none !important; width: 0 !important; height: 0 !important; background: #171a21 !important; }
::-webkit-scrollbar-corner { background: #171a21 !important; }

@media (max-width: 900px) {
    .sidebar { width: 72px; flex: 0 0 72px; }
    .brand-row { padding: 0 8px; }
    .brand-row .brand-title, .brand-row .brand-sub, .nav-item span, .sidebar-foot, .nav-label { display: none; }
    .nav-item { justify-content: center; }
    .content { padding: 10px; }
    .grid-2 { grid-template-columns: 1fr; }
    .topbar { padding: 0 12px; }
}

/* ------------------------------------------------------------------
 * 第六批：layuiAdmin 布局骨架 + Layui 组件深色映射 + 新页面样式
 * 说明：本段位于文件末尾，用于覆盖前面的通用规则，保证 layui.css 的
 * layuiAdmin 结构与 Layui 组件类名在深色皮肤下显示一致。
 * ------------------------------------------------------------------ */

/* ---------- layuiAdmin 布局骨架 ---------- */
.layui-layout-admin .layui-header.sysdeck-header {
    height: 56px;
    background: #20222a;
    border-bottom: 1px solid #16181e;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .28);
    z-index: 1000;
}
.sysdeck-header .brand-row {
    position: absolute; left: 0; top: 0;
    width: 230px; height: 56px;
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px;
    border-right: 1px solid #16181e;
}
.sysdeck-header .brand-mark {
    width: 30px; height: 30px; border-radius: 5px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), #0f8f83);
    color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .04em;
}
.brand-text .brand-title { font-size: 15px; font-weight: 600; color: #e8ebf0; letter-spacing: .06em; }
.brand-text .brand-sub { font-size: 11px; color: #7d8493; letter-spacing: .12em; }

.sysdeck-header-nav {
    position: absolute; right: 14px; top: 0; height: 56px;
    background: transparent;
    display: flex; align-items: center;
}
.sysdeck-header-nav .layui-nav-item { line-height: 56px; height: 56px; }
.sysdeck-header-nav .layui-nav-item > a { color: var(--muted); padding: 0 10px; }
.sysdeck-header-nav .user-chip { display: flex; align-items: center; gap: 8px; }
.sysdeck-header-nav .avatar {
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-2); font-size: 12px; font-weight: 600;
}
.sysdeck-header-nav .user-role { font-size: 11px; color: var(--muted-2); margin-left: 4px; }
.sysdeck-header-nav .layui-nav-child {
    top: 50px; background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
    min-width: 148px;
}
.sysdeck-header-nav .layui-nav-child dd a { color: var(--muted); line-height: 40px; }
.sysdeck-header-nav .layui-nav-child dd a:hover { color: var(--accent-2); background: var(--panel-2); }

.layui-layout-admin .layui-side.sysdeck-side {
    top: 56px; width: 230px;
    background: #20222a;
    border-right: 1px solid #16181e;
}
.layui-layout-admin .layui-side .layui-side-scroll { width: 230px; height: calc(100vh - 56px); }
.sysdeck-nav { background: transparent; padding: 6px 0 16px; }
.sysdeck-nav .layui-nav-item > a {
    height: 42px; line-height: 42px;
    padding: 0 18px;
    color: #b6bcc7; font-size: 13.5px; letter-spacing: .02em;
}
.sysdeck-nav .layui-nav-item > a .layui-icon { margin-right: 10px; font-size: 15px; color: #8d94a2; }
.sysdeck-nav .layui-nav-item > a:hover { color: #fff; background: #262a33; }
.sysdeck-nav .layui-nav-itemed > a { color: #fff; background: transparent; }
.sysdeck-nav .layui-nav-itemed > a .layui-icon { color: var(--accent-2); }
.sysdeck-nav .layui-nav-child { background: #1b1d24; padding: 2px 0 4px; }
.sysdeck-nav .layui-nav-child dd a {
    height: 36px; line-height: 36px; padding-left: 46px;
    font-size: 13px; color: #98a0ad;
}
.sysdeck-nav .layui-nav-child dd a:hover { color: #e8ebf0; background: #23262e; }
.sysdeck-nav .layui-nav-child dd.layui-this > a,
.sysdeck-nav .layui-nav-item.layui-this > a {
    color: var(--accent-2);
    background: linear-gradient(90deg, rgba(22, 186, 170, .16), rgba(22, 186, 170, .03));
    box-shadow: inset 3px 0 0 var(--accent);
}
.sysdeck-nav .layui-nav-bar { display: none; }
.sidebar-foot { padding: 14px 18px 0; color: #6f7684; font-size: 11.5px; line-height: 1.8; }

.layui-layout-admin .layui-body.sysdeck-body {
    top: 56px; left: 230px; bottom: 0; right: 0;
    display: flex; flex-direction: column;
    background: var(--bg);
    overflow: hidden;
}
.sysdeck-body .workspace-tabs {
    flex: 0 0 auto;
    display: flex; align-items: center;
    padding: 0 12px;
    background: #191b20;
    border-bottom: 1px solid #16181e;
    overflow-x: auto; overflow-y: hidden;
    min-height: 40px;
}
.sysdeck-body .workspace-tabs .layui-tab-title { border: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.sysdeck-body .workspace-tab { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 13px; border-radius: 2px 2px 0 0; }
.sysdeck-body .workspace-tab.layui-this { color: var(--accent-2); background: var(--bg); border: 1px solid #2c313b; border-bottom-color: var(--bg); }
.sysdeck-body .content {
    flex: 1 1 auto; min-height: 0;
    padding: 14px 16px 18px;
    overflow-y: auto; overflow-x: hidden;
}

/* ---------- Layui 组件 → 深色映射 ---------- */
.layui-btn {
    height: 32px; line-height: 30px; padding: 0 13px;
    background: var(--panel-2); border: 1px solid var(--line);
    color: var(--text); border-radius: var(--radius);
    font-size: 13px; font-weight: 400;
}
.layui-btn:hover { border-color: #4a505c; color: #fff; opacity: 1; }
.layui-btn-primary { background: transparent; border-color: var(--line); color: var(--muted); }
.layui-btn-primary:hover { color: var(--accent-2); border-color: var(--accent); }
.layui-btn-normal { background: var(--accent); border-color: var(--accent); color: #08120f; font-weight: 600; }
.layui-btn-normal:hover { background: var(--accent-2); border-color: var(--accent-2); color: #08120f; }
.layui-btn-danger { background: rgba(255, 87, 34, .16); border-color: rgba(255, 87, 34, .5); color: #ff8a65; }
.layui-btn-danger:hover { background: rgba(255, 87, 34, .26); color: #ffb59f; }
.layui-btn-sm { height: 28px; line-height: 26px; padding: 0 10px; font-size: 12px; }
.layui-btn-xs { height: 24px; line-height: 22px; padding: 0 8px; font-size: 12px; }

.layui-input, .layui-textarea, .layui-select {
    background: var(--panel); border: 1px solid var(--line);
    color: var(--text); border-radius: var(--radius);
    height: 32px; line-height: 30px;
}
.layui-textarea { height: auto; line-height: 1.6; padding: 8px 10px; }
.layui-input:focus, .layui-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.layui-input::placeholder, .layui-textarea::placeholder { color: var(--muted-2); }

.layui-card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: none; margin-bottom: 0;
}
.layui-card-header {
    height: 40px; line-height: 40px; padding: 0 14px;
    border-bottom: 1px solid var(--line); color: var(--text);
    font-size: 13px; font-weight: 600;
}
.layui-card-body { padding: 14px; }

.layui-table {
    background: transparent; color: var(--text); margin: 0;
}
.layui-table th {
    background: var(--panel-2); color: var(--muted);
    border-color: var(--line); font-weight: 600;
}
.layui-table td { border-color: var(--line-soft); color: var(--text); }
.layui-table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.layui-table-view { border-color: var(--line); }

.layui-badge { background: #3a3f4a; color: #cfd4dc; }
.layui-bg-blue { background: #1e9fff !important; }
.layui-bg-green { background: var(--ok) !important; }
.layui-badge-rim { border-color: var(--line); color: var(--muted); }

/* ---------- 服务列表：9 列固定宽度，禁止横向滚动 ---------- */
.svc-table { table-layout: fixed; width: 100%; }
.svc-table th:nth-child(1) { width: auto; }
.svc-table .svc-col-state { width: 76px; }
.svc-table .svc-col-auto { width: 88px; }
.svc-table .svc-col-alert { width: 72px; }
.svc-table .svc-col-cpu { width: 62px; }
.svc-table .svc-col-mem { width: 112px; }
.svc-table .svc-col-port { width: 82px; }
.svc-table .svc-col-desc { width: 170px; }
.svc-table .svc-col-ops { width: 104px; }
.svc-table th, .svc-table td {
    padding: 7px 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.svc-table .svc-name-cell { white-space: normal; }
.svc-table .svc-desc { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.svc-table .svc-ops { overflow: visible; }
.svc-table .svc-ops .icon-btn { width: 24px; height: 24px; font-size: 12px; }
.svc-memory { font-size: 12px; white-space: nowrap; }
.svc-ports { max-width: 100%; }

/* ---------- 日志高度自适应 ---------- */
.log-view { height: calc(100vh - 330px); min-height: 300px; max-height: calc(100vh - 330px); }
.file-log-view { height: calc(100vh - 380px); min-height: 260px; max-height: calc(100vh - 380px); }
.log-fill { height: calc(100vh - 250px); min-height: 340px; max-height: calc(100vh - 250px); }
.log-fill-sm { height: calc(100vh - 560px); min-height: 220px; max-height: calc(100vh - 560px); }

/* ---------- 代码生成器 ---------- */
.list-tools { flex-wrap: wrap; }
.list-tools .field { flex: 0 0 auto; }
.list-tools .input { width: 200px; }
.codegen-main { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.table-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 10px;
    max-height: 360px;
    overflow-y: auto;
    padding: 6px 4px;
    border-top: 1px solid var(--line-soft);
}
.table-option {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; border-radius: var(--radius);
    border-bottom: 1px solid var(--line-soft);
    cursor: pointer; min-width: 0;
}
.table-option:hover { background: var(--panel-2); }
.table-option input { accent-color: var(--accent); }
.table-option-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; cursor: pointer; }
.table-option-menu { width: 104px; flex: 0 0 104px; font-size: 11px; padding: 3px 6px; }
.table-option-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.table-option-desc { flex: 1; min-width: 0; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.template-list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.template-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-bottom: 1px solid var(--line-soft); }
.template-row .check-row { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.template-row .check-row input { accent-color: var(--accent); }
.template-file { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.template-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.preview-toolbar {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-bottom: 10px;
}
.preview-toolbar select {
    width: auto; max-width: 100%; min-width: 200px;
    flex: 0 1 auto;
}
.preview-toolbar .spacer { flex: 1 1 20px; }
.code-preview {
    margin: 0; padding: 14px; min-height: 260px; max-height: 46vh;
    overflow: auto; white-space: pre; font-size: 12.5px; line-height: 1.55;
    background: #14161a; border: 1px solid var(--line); border-radius: var(--radius);
}
.template-editor { width: 100%; min-height: 360px; max-height: 56vh; resize: vertical; font-size: 12.5px; }

/* ---------- 文档生成器 ---------- */
.docgen-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.docgen-source, .docgen-preview { min-width: 0; }
.drop-zone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 22px 16px; margin-bottom: 12px;
    border: 1px dashed #3f4652; border-radius: var(--radius-lg);
    background: rgba(22, 186, 170, .04);
    cursor: pointer; text-align: center;
}
.drop-zone:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone .layui-icon { font-size: 26px; color: var(--accent-2); }
.drop-title { font-size: 13.5px; color: var(--text); }
.drop-sub { font-size: 11.5px; color: var(--muted-2); }
.docgen-inputs { display: grid; grid-template-columns: 1fr; gap: 10px; }
.docgen-input { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.docgen-input input[type=file] { height: auto; padding: 6px 8px; }
.doc-files { margin: 12px 0; font-size: 12px; line-height: 1.9; color: var(--muted); }
.docgen-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.doc-preview-switch { display: flex; gap: 4px; }
.doc-preview-body {
    padding: 18px 20px; min-height: 460px; max-height: calc(100vh - 330px);
    overflow: auto; background: #1d2026; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.markdown-body { color: var(--text); font-size: 13.5px; line-height: 1.85; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
    color: #e8ebf0; margin: 18px 0 10px; font-weight: 600;
}
.markdown-body h1 { font-size: 22px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.markdown-body h2 { font-size: 18px; border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; }
.markdown-body h3 { font-size: 15.5px; }
.markdown-body p { margin: 8px 0; }
.markdown-body code { background: #14161a; border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; font-family: var(--mono); font-size: 12px; color: #9fd6cf; }
.markdown-body .md-code { background: #14161a; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow: auto; }
.markdown-body .md-code code { border: 0; background: transparent; padding: 0; color: #c9d1d9; }
.markdown-body .md-list { margin: 8px 0; padding-left: 20px; }
.markdown-body .md-list li { margin: 3px 0; }
.markdown-body blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--muted); }
.markdown-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.markdown-body .md-table { margin: 12px 0; }
.markdown-body a { color: var(--accent-2); text-decoration: underline; }

/* ---------- 邮件详情 ---------- */
.mail-detail-head { display: grid; gap: 6px; padding: 2px 2px 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.mail-detail-row { display: flex; gap: 10px; font-size: 12.5px; }
.mail-detail-row span { width: 76px; color: var(--muted-2); flex: 0 0 auto; }
.mail-detail-row b { color: var(--text); font-weight: 500; word-break: break-all; }
.mail-detail-frame-wrap { height: min(62vh, 540px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mail-preview-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.mail-row { cursor: pointer; }

/* ---------- 窄屏兼容 ---------- */
@media (max-width: 1280px) {
    .svc-table .svc-col-desc { width: 140px; }
    .svc-table .svc-col-mem { width: 100px; }
    .svc-table .svc-col-port { width: 74px; }
}
@media (max-width: 1100px) {
    .codegen-main, .docgen-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 第六批修订：layui.css 默认尺寸覆盖 ---------- */
.sysdeck-nav { width: 100%; }
.sysdeck-nav .layui-nav-item { width: 100%; }
.sysdeck-nav .layui-nav-child dd { width: 100%; }
.sysdeck-nav .layui-nav-child dd a { padding-left: 46px; }
.sysdeck-nav .layui-nav-item > a { padding: 0 18px; }
.sysdeck-header-nav .layui-nav-item .user-chip {
    display: flex; align-items: center; gap: 8px;
    height: 56px; line-height: 1.2; padding: 0 10px;
    color: var(--muted);
    background: transparent;
}
.sysdeck-header-nav .layui-nav-item .user-chip .user-name { font-size: 12.5px; color: var(--text); }
.sysdeck-header-nav .layui-nav-item .user-chip .user-role { font-size: 11px; color: var(--muted-2); }
.sysdeck-header-nav .layui-nav-item:hover .layui-nav-child { display: block; }
.sysdeck-header-nav .layui-nav-child dd a { display: flex; align-items: center; gap: 8px; }
.sysdeck-body .workspace-tab {
    display: flex; align-items: center;
    height: 40px; line-height: 20px;
    padding: 0 10px 0 13px;
    background: transparent;
}
.sysdeck-body .workspace-tabs .layui-tab-title { height: 40px; line-height: normal; border-bottom: 0; }
.sysdeck-body .workspace-tabs .layui-tab-title .layui-this:after { display: none; }
.sysdeck-body .workspace-tab.layui-this { background: var(--bg); }
.workspace-tabs .workspace-tab-close-all {
    height: 26px; margin-left: 6px; padding: 0 10px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: transparent; color: var(--muted-2); font-size: 12px; cursor: pointer;
}
.workspace-tabs .workspace-tab-close-all:hover { color: var(--accent-2); border-color: var(--accent); }
/* 侧栏激活项：只保留浅色渐变 + 左侧主色条，覆盖 layui 的整块主色背景 */
.sysdeck-nav .layui-nav-item.layui-this,
.sysdeck-nav .layui-nav-item.layui-this > a,
.sysdeck-nav .layui-nav-child dd.layui-this,
.sysdeck-nav .layui-nav-child dd.layui-this > a { background-color: transparent; }
.sysdeck-nav .layui-nav-item.layui-this > a,
.sysdeck-nav .layui-nav-child dd.layui-this > a {
    background-image: linear-gradient(90deg, rgba(22, 186, 170, .16), rgba(22, 186, 170, .03));
    box-shadow: inset 3px 0 0 var(--accent);
    color: var(--accent-2);
}
.sysdeck-nav .layui-nav-item.layui-this > a .layui-icon { color: var(--accent-2); }
/* 服务列表列宽终版：9 列固定宽，操作列留足 4 个图标，避免任何横向滚动 */
.svc-table .svc-col-state { width: 76px; }
.svc-table .svc-col-auto { width: 76px; }
.svc-table .svc-col-alert { width: 72px; }
.svc-table .svc-col-cpu { width: 64px; }
.svc-table .svc-col-mem { width: 118px; }
.svc-table .svc-col-port { width: 96px; }
.svc-table .svc-col-ops { width: 116px; }
.svc-table .svc-ops { display: flex; gap: 2px; justify-content: flex-end; overflow: visible; }
.svc-table .svc-ops .icon-btn { width: 24px; height: 24px; padding: 0; }
.svc-table .svc-memory { font-size: 12px; }

/* 侧栏子菜单激活项再压暗一档，避免整块亮色 */
.sysdeck-nav .layui-nav-child dd.layui-this > a {
    background-image: linear-gradient(90deg, rgba(22, 186, 170, .10), rgba(22, 186, 170, .02));
}
/* 服务列表列宽：按实测内容宽度分配（预警徽标 87px、内存 118px） */
.svc-table th:nth-child(1) { width: auto; }
.svc-table .svc-col-state { width: 84px; }
.svc-table .svc-col-auto { width: 82px; }
.svc-table .svc-col-alert { width: 90px; }
.svc-table .svc-col-cpu { width: 60px; }
.svc-table .svc-col-mem { width: 130px; }
.svc-table .svc-col-port { width: 96px; }
.svc-table .svc-col-desc { width: 140px; }
.svc-table .svc-col-ops { width: 116px; }
/* 列宽最终覆盖：直接按列序号指定，避免与最初的百分比列宽规则打架（描述已并入名称列，共 8 列） */
.svc-table th:nth-child(1) { width: auto; }
.svc-table th:nth-child(2) { width: 84px; }
.svc-table th:nth-child(3) { width: 84px; }
.svc-table th:nth-child(4) { width: 90px; }
.svc-table th:nth-child(5) { width: 60px; }
.svc-table th:nth-child(6) { width: 130px; }
.svc-table th:nth-child(7) { width: 96px; }
.svc-table th:nth-child(8) { width: 116px; }
/* 页面面板：非激活标签页强制隐藏，避免并发路由时多个页面叠加 */
.page-pane[hidden] { display: none !important; }
.page-pane.active { display: block; }
/* 侧栏菜单项撑满侧栏宽度（layui 默认 200px 会右侧留缝） */
.sysdeck-nav,
.sysdeck-nav .layui-nav-item,
.sysdeck-nav .layui-nav-item > a,
.sysdeck-nav .layui-nav-child,
.sysdeck-nav .layui-nav-child dd,
.sysdeck-nav .layui-nav-child dd > a { width: 100% !important; box-sizing: border-box; }
/* 弹窗层级高于 layuiAdmin 布局（侧栏/头部的 z-index 约为 1000+），避免被侧栏盖住左侧内容 */
.modal-backdrop { z-index: 3000 !important; }
.modal { position: relative; z-index: 3001; }

/* ------------------------------------------------------------------
 * layuiAdmin 多页（iframe）布局：主框架 + 各功能页
 * ------------------------------------------------------------------ */
.sd-main-body { overflow: hidden; }
.sd-shell { min-height: 100vh; }
.sd-shell .sd-header {
    height: 60px; line-height: 60px; padding: 0 18px 0 0;
    background: var(--panel); border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .3);
    display: flex; align-items: center;
}
.sd-logo { display: flex; align-items: center; gap: 10px; width: 220px; padding-left: 18px; }
.sd-logo-mark {
    width: 30px; height: 30px; line-height: 30px; text-align: center;
    border-radius: 4px; color: #fff; font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #0f8d81);
    box-shadow: 0 2px 8px rgba(22, 186, 170, .35);
}
.sd-logo-text { color: var(--text); font-size: 16px; font-weight: 600; letter-spacing: .02em; line-height: 1.1; }
.sd-logo-text em { display: block; font-style: normal; font-size: 12px; font-weight: 400; color: var(--muted-2); letter-spacing: .12em; }
.sd-top-actions {
    margin-left: auto; display: flex; align-items: center; gap: 14px;
    list-style: none; padding: 0 4px 0 0;
}
.sd-user { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; line-height: 1; }
.sd-user .layui-icon { color: var(--accent); font-size: 16px; }
.sd-role {
    padding: 1px 6px; border: 1px solid rgba(22, 186, 170, .45); border-radius: 2px;
    color: var(--accent-2); font-size: 11px;
}
.sd-link {
    border: 0; background: transparent; color: var(--muted-2);
    font-size: 12px; cursor: pointer; padding: 2px 4px;
}
.sd-link:hover { color: var(--accent-2); }

/* 通知铃铛 */
.sd-bell { position: relative; }
.sd-bell-btn {
    position: relative; width: 34px; height: 34px; line-height: 34px; padding: 0;
    border: 1px solid var(--line); border-radius: 50%;
    background: var(--panel-2); color: var(--muted); cursor: pointer;
}
.sd-bell-btn:hover { color: var(--accent-2); border-color: var(--accent); }
.sd-bell-ring { color: var(--accent-2); border-color: rgba(22, 186, 170, .5); }
.sd-bell-btn .layui-icon { font-size: 17px; }
.sd-badge {
    position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; line-height: 17px;
    padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff;
    font-size: 11px; text-align: center; box-shadow: 0 0 0 2px var(--panel);
}
.sd-bell-panel {
    position: absolute; top: 46px; right: -10px; width: 340px; max-height: 460px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .55); z-index: 5000; overflow: hidden;
    line-height: 1.6;
}
.sd-bell-head {
    display: flex; align-items: center; gap: 8px;
    height: 40px; line-height: 40px; padding: 0 12px;
    border-bottom: 1px solid var(--line-soft); color: var(--text); font-size: 13px;
}
.sd-bell-list { max-height: 360px; overflow-y: auto; }
.sd-bell-empty { padding: 30px 0; text-align: center; color: var(--muted-2); font-size: 13px; }
.sd-bell-item { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); cursor: pointer; line-height: 1.55; }
.sd-bell-item:hover { background: var(--panel-2); }
.sd-bell-item-read { opacity: .55; }
.sd-bell-item-top { display: flex; align-items: center; gap: 6px; line-height: 1.55; }
.sd-bell-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.sd-dot-error { background: var(--danger); }
.sd-dot-warn { background: var(--warn); }
.sd-bell-title { flex: 1; min-width: 0; color: var(--text); font-size: 13px; line-height: 1.55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-bell-time { color: var(--muted-2); font-size: 11px; flex: none; }
.sd-bell-desc {
    margin-top: 2px; padding-left: 13px; color: var(--muted-2); font-size: 12px; line-height: 1.55;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sd-bell-foot {
    height: 36px; line-height: 36px; text-align: center; border-top: 1px solid var(--line-soft);
    font-size: 12px; color: var(--accent-2);
}
.sd-bell-foot a { color: var(--accent-2); }

/* 侧栏 */
.sd-shell .sd-side { width: 220px; background: var(--panel); border-right: 1px solid var(--line); top: 60px; }
.sd-shell .sd-side .layui-side-scroll { width: 100%; }
.sd-nav { background: transparent; padding: 8px 0 20px; }
.sd-nav .layui-nav-item a { color: var(--muted); font-size: 13px; }
.sd-nav .layui-nav-item > a { height: 44px; line-height: 44px; padding-left: 18px; }
.sd-nav .layui-nav-item > a .layui-icon { margin-right: 10px; font-size: 15px; color: var(--muted-2); }
.layui-nav-tree .layui-nav-child dd a .layui-icon { margin-right: 10px; font-size: 15px; }
.sd-nav-sub { padding-bottom: 4px; }
.sd-nav-sub.sd-nav-collapsed { display: none; }
.sd-nav-item {
    display: block; height: 36px; line-height: 36px !important; padding-left: 44px !important;
    color: var(--muted-2) !important; font-size: 12.5px !important; border-left: 3px solid transparent;
}
.sd-nav-item .sd-nav-dot {
    display: inline-block; width: 4px; height: 4px; margin-right: 8px; vertical-align: middle;
    border-radius: 50%; background: var(--line); 
}
.sd-nav-item:hover { color: var(--accent-2) !important; background: var(--bg-soft) !important; }
.sd-nav-active {
    color: var(--accent-2) !important;
    background-image: linear-gradient(90deg, rgba(22, 186, 170, .16), rgba(22, 186, 170, .02)) !important;
    border-left-color: var(--accent);
}
.sd-nav-active .sd-nav-dot { background: var(--accent); }

/* 主体 + 工作区标签 */
.sd-shell .sd-body { top: 60px; left: 220px; bottom: 40px; right: 0; background: var(--bg); }
.sd-tabs {
    height: 40px; display: flex; align-items: center;
    background: #1a1e24; border-bottom: 1px solid #242a34;
}
.sd-tab-scroll {
    flex: 0 0 28px; width: 28px; height: 100%; padding: 0; border: 0; border-right: 1px solid #242a34;
    background: #1c2027; color: #8b97a6; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.sd-tab-scroll:last-of-type { border-right: 0; border-left: 1px solid #242a34; }
.sd-tab-scroll:hover:not(:disabled) { color: var(--accent-2); background: #20252d; }
.sd-tab-scroll:disabled { opacity: .32; cursor: default; }
.sd-tab-scroll .layui-icon { font-size: 14px; }
.sd-tab-list { flex: 1; min-width: 0; display: flex; align-items: stretch; height: 100%; overflow: hidden; list-style: none; margin: 0; padding: 0; }
.sd-tab-item {
    position: relative; display: flex; align-items: center; padding: 0 32px 0 14px;
    height: 100%; border-right: 1px solid #242a34; cursor: pointer;
    color: #95a1b0; background: #1a1e24; font-size: 12.5px; white-space: nowrap; flex: 0 0 auto;
}
.sd-tab-item:hover { color: var(--text); background: #1e232a; }
.sd-tab-active { color: var(--accent-2); background: #22272f; box-shadow: inset 0 -2px 0 var(--accent); }
.sd-tab-label { display: inline-block; line-height: 1; }
.sd-tab-close,
.sd-tab-close.layui-btn {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; min-width: 18px; line-height: 18px; margin: 0; padding: 0;
    border: 0 !important; border-radius: 3px; background: transparent; color: #7f8b9b; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; box-shadow: none !important;
}
.sd-tab-close .layui-icon { font-size: 12px; line-height: 1; }
.sd-tab-item:hover .sd-tab-close,
.sd-tab-item.sd-tab-active .sd-tab-close { color: #aab5c2; }
.sd-tab-close:hover { background: rgba(255, 87, 34, .18); color: var(--danger) !important; }
.sd-tabs-tools { display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.sd-tab-tool {
    width: 30px; height: 28px; min-width: 30px; line-height: 26px; padding: 0;
    border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--muted-2); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; box-shadow: none;
}
.sd-tab-tool .layui-icon { font-size: 14px; line-height: 1; }
.sd-frames { position: absolute; top: 40px; left: 0; right: 0; bottom: 0; }
.sd-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); display: none; }
.sd-frame-active { display: block; }
.sd-shell .sd-footer {
    height: 40px; line-height: 40px; left: 220px; padding: 0 16px;
    display: flex; align-items: center; background: var(--panel); border-top: 1px solid var(--line);
    color: var(--muted-2); font-size: 12px;
}

/* iframe 内页面 */
.sd-view-body { margin: 0; background: var(--bg); color: var(--text); border-right: 0 !important; }
.sd-view-app { padding: 14px 16px 16px; min-height: calc(100vh - 1px); position: relative; }
html { border-right: 0 !important; }
.sd-view-body.sd-view-fixed { overflow: hidden; }
.sd-view-fixed .sd-view-app { height: 100vh; min-height: 0; }
.sd-view-body .page-head { margin-bottom: 12px; }
.sd-view-body .page-title { font-size: 17px; }

/* 可点击元素统一手型；禁用态保持 not-allowed */
button:not(:disabled),
.btn:not(:disabled),
.layui-btn:not(.layui-btn-disabled),
a[href],
.sd-tab-item,
.sd-row-clickable,
.drop-zone,
.layui-form-checkbox,
.layui-form-switch,
.layui-form-select,
.layui-table-tool-temp .layui-btn,
.layui-laypage a,
.layui-laypage button { cursor: pointer; }
button:disabled,
.btn:disabled,
.layui-btn-disabled,
.layui-btn.layui-disabled { cursor: not-allowed !important; pointer-events: none !important; }
.sd-row-clickable { cursor: pointer !important; }

/* 登录页 */
.sd-login-body {
    margin: 0; min-height: 100vh;
    background:
        radial-gradient(900px 480px at 12% 0%, rgba(22, 186, 170, .12), transparent 60%),
        radial-gradient(700px 420px at 100% 100%, rgba(47, 150, 136, .10), transparent 62%),
        var(--bg);
    display: flex; align-items: center; justify-content: center; padding: 30px 18px;
}
.sd-login { width: 100%; max-width: 400px; }
.sd-login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.sd-login-brand .sd-logo-mark { width: 44px; height: 44px; line-height: 44px; font-size: 20px; }
.sd-login-brand h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: .04em; }
.sd-login-brand p { margin: 4px 0 0; color: var(--muted-2); font-size: 12.5px; letter-spacing: .06em; }
.sd-login-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 26px 26px 20px; box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}
.sd-login-title { font-size: 15px; color: var(--text); margin-bottom: 18px; letter-spacing: .06em; }
.sd-login-field { display: block; margin-bottom: 14px; }
.sd-login-field span { display: block; color: var(--muted-2); font-size: 12px; margin-bottom: 6px; letter-spacing: .06em; }
.sd-login-field input {
    width: 100%; height: 40px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--panel-2); color: var(--text); outline: none;
}
.sd-login-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(22, 186, 170, .14); }
.sd-login-error { margin: -4px 0 12px; color: var(--danger); font-size: 12px; }
.sd-login-btn {
    width: 100%; height: 40px; border: 0; border-radius: var(--radius);
    background: linear-gradient(90deg, #16baaa, #12a294); color: #fff;
    font-size: 14px; letter-spacing: .2em; cursor: pointer;
}
.sd-login-btn:disabled { opacity: .7; cursor: default; }
.sd-login-tip { margin-top: 12px; color: var(--muted-2); font-size: 11.5px; text-align: center; }
.sd-login-foot { margin-top: 20px; text-align: center; color: var(--muted-2); font-size: 11.5px; letter-spacing: .08em; }

/* 文档生成器：来源在上、预览在下，左右两栏 */
.docgen-source-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
.docgen-source-actions { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.docgen-source-actions .btn { flex: 1; justify-content: center; height: 30px; }
.docgen-source-actions .layui-icon { font-size: 15px; }
.docgen-source-left { min-width: 0; }
.docgen-source-right { min-width: 0; display: flex; flex-direction: column; }
.panel-sub-title { color: var(--muted-2); font-size: 12px; margin-bottom: 8px; letter-spacing: .06em; }
.docgen-preview-panel { margin-top: 14px; }
.docgen-preview-body { height: auto !important; min-height: 420px; max-height: none !important; overflow: visible !important; }
.docgen-preview-body .markdown-body { padding: 4px 6px 20px; }

/* 服务列表：全部列头居中，描述并入名称单元格 */
.svc-table thead th { text-align: center !important; }
.svc-table .svc-name-cell { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.svc-table .svc-name-line { display: flex; align-items: center; gap: 6px; }
.svc-table .svc-name-text { color: var(--text); font-size: 13px; font-weight: 500; }
.svc-table .svc-desc-line {
    color: var(--muted-2); font-size: 11.5px; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 14px;
}
/* 描述直接跟在服务名后面（同一行，超长省略） */
.svc-table .svc-desc-inline {
    flex: 1; min-width: 0; margin-left: 4px;
    color: var(--muted-2); font-size: 11.5px; font-weight: 400;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 代码生成器：配置区 */
.codegen-config { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.codegen-config .field-span-2 { grid-column: span 2; }
.codegen-jdbc-preview {
    margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--radius);
    color: var(--muted-2); font-family: var(--mono); font-size: 12px; word-break: break-all;
}

/* 日志页：预览框内部滚动，父页面不出现滚动条 */
.logs-fixed .page-head { flex: none; }

/* 关于系统 */
.about-desc { padding: 4px 2px 2px; color: var(--muted); line-height: 1.9; font-size: 13px; }
.about-desc p { margin: 0 0 8px; }
.about-desc code { color: var(--accent-2); font-family: var(--mono); font-size: 12px; }
.about-list { display: flex; flex-direction: column; gap: 10px; }
.about-item { display: flex; gap: 10px; padding: 9px 10px; background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.about-tag {
    flex: none; height: 22px; line-height: 22px; padding: 0 8px; border-radius: 2px;
    background: var(--accent-soft); color: var(--accent-2); font-size: 12px;
}
.about-item b { color: var(--text); font-size: 13px; }
.about-item p { margin: 3px 0 0; color: var(--muted-2); font-size: 12px; line-height: 1.7; }
.about-kv { display: flex; flex-direction: column; }
.about-kv > div { display: flex; gap: 12px; padding: 7px 2px; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px; }
.about-kv span { width: 132px; flex: none; color: var(--muted-2); }
.about-kv b { color: var(--text); font-weight: 500; word-break: break-all; }

/* 更新日志 */
.changelog { display: flex; flex-direction: column; gap: 0; }
.changelog-item { position: relative; padding: 0 0 20px 22px; border-left: 2px solid var(--line); }
.changelog-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.changelog-item::before {
    content: ''; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px;
    border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(22, 186, 170, .15);
}
.changelog-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.changelog-version { color: var(--accent-2); font-size: 14px; font-weight: 600; }
.changelog-date { color: var(--muted-2); font-size: 12px; font-family: var(--mono); }
.changelog-title { color: var(--text); font-size: 13px; }
.changelog-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.95; }
.changelog-list li { list-style: disc; }

/* 异常页：从通知铃铛跳转时高亮目标行 */
.row-highlight td { background: rgba(255, 184, 0, .12) !important; box-shadow: inset 3px 0 0 var(--warn); }

/* ======================= layui 组件暗色适配 ======================= */
:root {
    --sd-layui-border: #2a3038;
    --sd-layui-bg: #171a1f;
    --sd-layui-bg-soft: #1d2229;
    --sd-layui-text: #c8d0da;
    --sd-layui-dim: #8a94a3;
}

/* 按钮：统一 layui 尺寸与暗色 */
.btn, .layui-btn { border-radius: 6px; font-size: 13px; }
.layui-btn { background-color: #16baaa; color: #fff; border: 1px solid transparent; }
.layui-btn:hover { opacity: .9; color: #fff; }
.layui-btn-primary {
    background: transparent; border-color: #3a424d; color: var(--sd-layui-text);
}
.layui-btn-primary:hover { border-color: #16baaa; color: #16baaa; background: rgba(22,186,170,.06); }
.layui-btn-normal { background-color: #1e9fff; color: #fff; }
.layui-btn-danger { background-color: #ff5722; color: #fff; }
.layui-btn-disabled, .layui-btn-disabled:hover { opacity: .45; cursor: not-allowed; color: #9aa4b2; }
.layui-btn-xs { height: 24px; line-height: 22px; padding: 0 8px; font-size: 12px; }

/* 输入框 / 下拉 / 文本域 */
.layui-input, .layui-textarea, .layui-select, select.layui-input {
    background: var(--sd-layui-bg);
    border-color: #343b45;
    color: var(--sd-layui-text);
    border-radius: 6px;
    height: 34px;
}
.layui-textarea { height: auto; min-height: 84px; }
.layui-input:hover, .layui-textarea:hover, select.layui-input:hover { border-color: #16baaa !important; }
.layui-input:focus, .layui-textarea:focus, select.layui-input:focus {
    border-color: #16baaa !important; box-shadow: 0 0 0 2px rgba(22,186,170,.14);
}
.layui-input::placeholder, .layui-textarea::placeholder { color: #6f7a89; }
select.layui-input { padding: 0 8px; }

/* 日期框：手型光标、禁止选中、点击即弹出 laydate */
.sd-date-input {
    cursor: pointer !important;
    -webkit-user-select: none; -moz-user-select: none; user-select: none;
    caret-color: transparent;
}
.sd-date-input:hover { border-color: #16baaa !important; }
.laydate-input { cursor: pointer; }

/* 表格：layui-table 暗色 */
.sd-layui-table-wrap { border: none !important; }
.layui-table-header { border-bottom-color: #2a303a !important; }
.layui-table {
    background: transparent;
    color: var(--sd-layui-text);
    margin: 0;
}
.layui-table thead tr, .layui-table-header { background: var(--sd-layui-bg-soft); }
.layui-table th {
    color: #b9c4d2; font-weight: 500; border-color: var(--sd-layui-border) !important;
    background: var(--sd-layui-bg-soft) !important;
}
.layui-table td, .layui-table th { border-color: var(--sd-layui-border) !important; }
.layui-table tbody tr { background: transparent; }
.layui-table tbody tr:hover, .layui-table-hover { background: rgba(22,186,170,.07) !important; }
.layui-table-view { border: none; background: transparent; }
.layui-table-page, .layui-table-tool, .layui-table-total { background: var(--sd-layui-bg-soft); }

/* 侧边导航 */
.layui-nav-tree, .sd-nav { background: #15181d; width: 100%; }
.layui-nav-tree .layui-nav-item > a { color: #c2cbd6; }
.layui-nav-tree .layui-nav-item > a:hover { color: #16baaa; }
.layui-nav-tree .layui-nav-child dd a { color: #9fabb9; padding-left: 44px; }
.layui-nav-tree .layui-nav-child dd a:hover,
.layui-nav-tree .layui-nav-child dd.layui-this a,
.layui-nav-tree .layui-nav-child dd a.layui-this { color: #16baaa; background: rgba(22,186,170,.08); }
.layui-nav-tree .layui-nav-bar { background-color: #16baaa; }
.layui-nav-tree .layui-this > a { background: rgba(22,186,170,.10); color: #16baaa; }
.layui-nav-tree .layui-nav-itemed > a { color: #d7dee7; }

/* 顶部标签页 */
.sd-tabs.layui-tab { margin: 0; border: none; box-shadow: none; background: #1a1e24; }
.sd-tab-list.layui-tab-title { border-bottom: none !important; height: 38px; line-height: 38px; }
/* 去掉 layui 标签栏 ::after 自带的 1px 浅色横线 */
.sd-tab-list.layui-tab-title::after,
.sd-tab-list.layui-tab-title .sd-tab-item::after,
.sd-tab-list.layui-tab-title .layui-this::after { border: 0 !important; border-bottom: 0 !important; display: none !important; }
.sd-tab-list.layui-tab-title .sd-tab-item { color: #aab4c1; border: none; background: transparent; padding: 0 32px 0 14px !important; }
.sd-tab-list.layui-tab-title .sd-tab-item.layui-this,
.sd-tab-list.layui-tab-title .sd-tab-item.sd-tab-active {
    color: #16baaa; border-bottom: 0 !important;
}
.sd-frames.layui-tab-content { padding: 0; margin: 0; }

/* 弹层：layer 暗色 */
.layui-layer.sd-layer { background: #1c2027; border-radius: 10px; box-shadow: 0 18px 48px rgba(0,0,0,.45); }
.layui-layer.sd-layer .layui-layer-title {
    background: #20252d; color: #e4ebf3; border-bottom: 1px solid #2c333d;
    border-radius: 10px 10px 0 0; height: 46px; line-height: 46px;
}
.layui-layer.sd-layer .layui-layer-setwin .layui-layer-close2 { filter: invert(1) brightness(.8); }
.layui-layer.sd-layer .layui-layer-content { color: var(--sd-layui-text); }
.sd-layer-body { padding: 16px 18px 6px; max-height: 72vh; overflow: auto; }
.sd-layer-body.sd-layer-wide { padding: 18px 20px 10px; max-height: 82vh; }
.exception-detail-info {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
    margin-bottom: 12px; padding: 10px 12px; border: 1px solid #2c333d;
    border-radius: 6px; background: #191d24;
}
.exception-detail-info strong { color: #e4ebf3; font-size: 13px; }
.exception-detail-info span { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.exception-detail-info p { flex: 0 0 100%; margin: 0; color: #b9c2cf; font-size: 12.5px; line-height: 1.6; }
.exception-stack {
    overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
    margin: 0; padding: 14px 16px;
    font-family: var(--mono, ui-monospace, Consolas, monospace);
    font-size: 12.5px; line-height: 1.7;
    background: #14171c; border: 1px solid #2b303a;
    border-radius: 6px; color: #c8d1dd;
    scrollbar-color: #3a414d #14171c;
}
.sd-layer-content { font-size: 13px; }
.sd-layer-foot {
    display: flex; justify-content: flex-end; align-items: center; gap: 10px;
    padding: 12px 0 10px; border-top: 1px solid #2c333d; margin-top: 14px;
}
.layui-layer-msg { background: rgba(30,35,42,.96) !important; border: 1px solid #343c47 !important; color: #dfe6ee !important; }
.layui-layer-dialog { background: #1c2027 !important; }
.layui-layer-dialog .layui-layer-content, .layui-layer-dialog .layui-layer-title { color: #dfe6ee !important; }
.layui-layer-dialog .layui-layer-btn { border-top-color: #2c333d !important; }
.layui-layer-dialog .layui-layer-btn a { background: #16baaa; border-color: #16baaa; }
.layui-layer-dialog .layui-layer-btn .layui-layer-btn1 { background: #2a3039; border-color: #3a424d; color: #c8d0da; }
/* 部分内嵌浏览器会暂停 layer 入场动画，导致弹层停在 scale(.5)/opacity:0，这里强制落到终态 */
.layui-layer.layer-anim,
.layui-layer.layer-anim-00,
.layui-layer.layer-anim-06 { animation: none !important; opacity: 1 !important; transform: none !important; }

/* 标签 */
.layui-tab-title .layui-this:after { border-bottom-color: #16baaa; }
.layui-tab-brief > .layui-tab-title .layui-this { color: #16baaa; }
/* ======================= 服务列表：名称/描述分行 + 列宽自适应 ======================= */
.svc-table { width: 100%; table-layout: fixed; min-width: 0; }
.svc-table .svc-name-cell { width: auto; padding-left: 10px; }
.svc-table .svc-name-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.svc-table .svc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-table .svc-desc {
    margin-top: 2px; color: #8d98a7; font-size: 12px; line-height: 1.35;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.svc-table .svc-sub { margin-top: 1px; font-size: 11px; }
.svc-table .svc-col-state { width: 88px; }
.svc-table .svc-col-auto { width: 96px; }
.svc-table .svc-col-alert { width: 82px; }
.svc-table .svc-col-cpu { width: 72px; }
.svc-table .svc-col-mem { width: 112px; }
.svc-table .svc-col-port { width: 112px; }
.svc-table .svc-col-ops { width: 132px; padding-right: 8px; }
.svc-table th, .svc-table td { padding: 8px 8px; }
.svc-table .svc-ops { white-space: nowrap; }
.svc-table .svc-op { width: 26px; height: 24px; margin-left: 2px; }
.table-wrap:has(.svc-table) { overflow-x: hidden; }/* 服务操作按钮：悬停显示阴影与浮起效果 */
.svc-table .svc-ops .icon-btn {
    border: 1px solid transparent; border-radius: 4px; transition: box-shadow .15s ease, transform .15s ease, background .15s ease;
}
.svc-table .svc-ops .icon-btn:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .38), 0 0 0 1px rgba(22,186,170,.45);
    transform: translateY(-1px); background: rgba(22,186,170,.12);
}/* 服务详情采样/属性表：每页 5 条，尽量不出现滚动条 */
.sd-detail-table { max-height: none !important; overflow: visible !important; }
.sd-detail-table table { width: 100%; }/* 角色权限选择 */
.sd-perm-box { display:flex; flex-wrap:wrap; gap:10px; padding:10px; border:1px solid #2d343e; border-radius:8px; background:#171a1f; }
.sd-perm-group { min-width:200px; flex:1 1 200px; }
.sd-perm-title { color:#9fb0c2; font-size:12px; margin-bottom:6px; }
.sd-perm-group label, .sd-perm-action { display:flex; align-items:center; gap:6px; padding:4px 0; color:#b6c1cf; }
/* 角色权限树：菜单为父节点，功能为子节点 */
.sd-role-tree {
    height: 340px; overflow: auto; padding: 8px 10px;
    border: 1px solid #2d343e; border-radius: 8px; background: #171a1f;
}
.sd-role-tree .layui-tree { color: #c2ccd8; }
.sd-role-tree .layui-tree li { color: #c2ccd8; }
.sd-role-tree .layui-tree-txt { color: #c2ccd8 !important; font-size: 12.5px; }
.sd-role-tree .layui-tree-entry { min-height: 30px; line-height: 30px; border-radius: 5px; }
.sd-role-tree .layui-tree-entry:hover { background: #20252d; }
.sd-role-tree .layui-tree-iconClick .layui-icon { color: #7c8a9b; }
.sd-role-tree .layui-tree-main { padding-right: 8px; }
.sd-role-tree .layui-form-checkbox[lay-skin=primary] span { color: #c2ccd8; }
.sd-role-tree .layui-tree-set .layui-tree-set { margin-left: 2px; }
.sd-role-tree .layui-tree-txt.layui-disabled { color: #6b7684 !important; }/* 文档生成器：左右两栏等高、内容对齐 */
.docgen-source-grid { align-items: start; }
.docgen-source-left, .docgen-source-right {
    min-height: 0; padding: 12px 14px; border: 1px solid #2a3038; border-radius: 8px; background: #171a1f;
}
.docgen-source-right { justify-content: flex-start; }
.docgen-source-left .hint, .docgen-source-right .hint { margin-top: 10px; }
.docgen-source-right .docgen-file-list { flex: none; }/* 代码预览：语法高亮（深色低刺激配色） */
.code-preview code.code-highlight { display:block; white-space:pre; font-family:ui-monospace,Consolas,"Cascadia Mono",monospace; font-size:13px; line-height:1.6; }
.tok-comment { color:#6b7f8f; font-style:italic; }
.tok-string { color:#a6c88a; }
.tok-keyword { color:#7fb2e5; font-weight:600; }
.tok-type { color:#e0c07a; }
.tok-number { color:#d59f7a; }
.tok-annotation { color:#c39ae0; }
.tok-tag { color:#7fb2e5; }
.code-preview { background:#14171c; border:1px solid #2a3038; border-radius:8px; }
/* 日期控件可点击手势，禁止选中内部文本 */
input.laydate, .laydate-input, input[data-laydate], .date-input { cursor:pointer; user-select:none; }
.laydate-brief, .laydate-time-list, .layui-laydate * { cursor:default; }/* 关于系统：详细功能清单 */
.about-functions { display:flex; flex-direction:column; gap:14px; }
.about-fn { border:1px solid #2a3038; border-radius:9px; padding:14px 16px; background:#171a1f; }
.about-fn-head { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.about-fn-head h3 { margin:0; font-size:15px; color:#e6edf3; }
.about-fn-desc { margin:0 0 8px; color:#9fb0c2; font-size:13px; }
.about-fn ul { margin:0; padding-left:18px; display:flex; flex-direction:column; gap:5px; }
.about-fn li { color:#c2ccd8; font-size:13px; line-height:1.65; }
.about-fn li b { color:#e6edf3; font-weight:600; }/* 服务列表：名称自适应，其余列按内容收紧并保留边距，不出现横向滚动 */
.svc-table { table-layout: auto; width: 100%; }
.svc-table th:nth-child(n+2), .svc-table td:nth-child(n+2) { width: 1%; white-space: nowrap; }
.svc-table .svc-col-name { width: auto; min-width: 300px; }
.svc-table .svc-name-cell { min-width: 300px; padding-right: 18px; }
.svc-table th, .svc-table td { padding: 9px 12px; }
.svc-table .svc-col-state, .svc-table .svc-col-auto, .svc-table .svc-col-alert,
.svc-table .svc-col-cpu, .svc-table .svc-col-mem, .svc-table .svc-col-port { min-width: 84px; }
.svc-table .svc-col-ops { min-width: 132px; }
.table-wrap:has(.svc-table) { overflow-x: hidden; }/* laydate 输入框：手型、不可选中，点击即选择 */
input.sd-date-input, .sd-date-input.layui-input { cursor:pointer; user-select:none; }
.layui-laydate, .layui-laydate * { user-select:none; }/* 左侧菜单：当前项不再用 layui 默认实色块，改为低亮度选中背景 */
.layui-nav-tree .layui-nav-child dd.layui-this,
.layui-nav-tree .layui-nav-child dd.layui-this > a { background: transparent !important; }
.layui-nav-tree .layui-nav-child dd.layui-this > a {
    color: #16baaa !important;
    background: rgba(22,186,170,.10) !important;
    border-left: 3px solid #16baaa;
    padding-left: 41px !important;
}
.layui-nav-tree .layui-nav-item.layui-this > a { background: transparent !important; }
/* 单菜单分组（关于系统）直接作为一级链接，选中时同样低亮青底 */
.layui-nav-tree .layui-nav-item.layui-this > a.sd-nav-parent-link {
    color: #16baaa !important;
    background: rgba(22, 186, 170, .10) !important;
    border-left: 3px solid #16baaa;
    padding-left: 14px !important;
}
.layui-nav-tree .layui-nav-item > a.sd-nav-parent-link .layui-icon { color: #7c8a9b; }
.layui-nav-tree .layui-nav-item.layui-this > a.sd-nav-parent-link .layui-icon { color: #16baaa; }
/* 当前菜单只高亮子项，父级 li 不再整块铺实色青 */
.layui-nav-tree.sd-nav li.layui-nav-item.layui-this,
.layui-nav-tree.sd-nav li.layui-this,
.layui-nav-tree.sd-nav .layui-nav-child dd.layui-this { background: transparent !important; color: inherit !important; }
.layui-nav-tree .layui-nav-child dd.layui-this > a { color: #16baaa !important; background: rgba(22,186,170,.10) !important; }
.sd-nav .sd-nav-group[data-group="home"].layui-this { color: #16baaa !important; background: rgba(22,186,170,.08) !important; }
.layui-nav-tree .layui-nav-child dd.layui-this > a .layui-icon { color: #16baaa !important; }
/* 子菜单图标：恢复 layui 图标尺寸，并与标题保持和父菜单一致的 10px 间距 */
.layui-nav-tree.sd-nav .sd-nav-link .layui-icon,
.layui-nav-tree.sd-nav .sd-nav-group .layui-icon {
    width: 16px; height: 16px; min-width: 16px; line-height: 16px;
    margin-right: 10px; border-radius: 0; background: transparent;
    font-size: 15px; vertical-align: -2px; display: inline-block; text-align: center;
}
.layui-nav-tree.sd-nav .sd-nav-link .layui-icon.sd-nav-dot {
    width: 16px; height: 16px; font-size: 15px; border-radius: 0; background: transparent;
}

/* 服务列表：固定百分比列宽，保证 8 列全部落在可视区 */
.svc-table { table-layout: fixed !important; width: 100% !important; }
.svc-table th.svc-col-name { width: auto !important; min-width: 0 !important; }
.svc-table .svc-name-cell { min-width: 0 !important; padding: 9px 10px !important; }
.svc-table .svc-col-state { width: 9% !important; min-width: 0 !important; }
.svc-table .svc-col-auto { width: 10% !important; min-width: 0 !important; }
.svc-table .svc-col-alert { width: 9% !important; min-width: 0 !important; }
.svc-table .svc-col-cpu { width: 7% !important; min-width: 0 !important; }
.svc-table .svc-col-mem { width: 10% !important; min-width: 0 !important; }
.svc-table .svc-col-port { width: 9% !important; min-width: 0 !important; }
.svc-table .svc-col-ops { width: 15% !important; min-width: 0 !important; }
.svc-table th, .svc-table td { padding: 8px 8px !important; }
.svc-table .svc-kind { flex: 0 0 auto; margin-left: 6px; padding: 0 5px; font-size: 10px; color: #77879a; border: 1px solid #333b46; border-radius: 3px; }
.svc-table .svc-desc { max-width: 100%; }/* 列表描边统一为深色，去掉 layui 默认浅色/白色边框 */
.layui-table,
.layui-table td,
.layui-table th,
.svc-table,
.svc-table td,
.svc-table th,
.table,
.table td,
.table th {
    border-color: #242a34 !important;
}
.svc-table { border: 1px solid #242a34 !important; }
.svc-table thead th { border-bottom-color: #2c3440 !important; }
.layui-table-view, .table-wrap { border-color: #242a34 !important; }/* 服务列表列宽微调：名称与内存留足空间 */
.svc-table .svc-col-state { width: 9% !important; }
.svc-table .svc-col-auto { width: 9% !important; }
.svc-table .svc-col-alert { width: 8% !important; }
.svc-table .svc-col-cpu { width: 6% !important; }
.svc-table .svc-col-mem { width: 12% !important; }
.svc-table .svc-col-port { width: 8% !important; }
.svc-table .svc-col-ops { width: 14% !important; }/* 关闭预警：已开启服务列表 4 列固定宽度 */
.alert-svc-table { table-layout: fixed !important; width: 100% !important; border: 1px solid #242a34 !important; }
.alert-svc-table th:nth-child(1) { width: 32% !important; }
.alert-svc-table th:nth-child(2) { width: 13% !important; }
.alert-svc-table th:nth-child(3) { width: auto !important; }
.alert-svc-table th:nth-child(4) { width: 16% !important; }
.alert-svc-table td, .alert-svc-table th { border-color: #242a34 !important; padding: 9px 10px !important; vertical-align: middle; }
.alert-svc-table td:nth-child(1) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-svc-table .desc-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-svc-table thead th { text-align: center; }

.layui-layer.sd-layer { background: #1c2027 !important; }
.layui-layer.sd-layer .layui-layer-content { background: #1c2027 !important; }
.sd-layer-body { background: #1c2027; }

/* 左侧菜单：分组标题（layui-nav-itemed）不再使用 layui 默认实色青底 */
.layui-nav-tree.sd-nav .layui-nav-itemed > a,
.layui-nav-tree.sd-nav .layui-nav-itemed > a:hover { background: transparent !important; color: #9fabb9 !important; }
.layui-nav-tree.sd-nav .layui-nav-itemed > a .layui-icon { color: #9fabb9 !important; }
.layui-nav-tree.sd-nav .layui-nav-itemed > a.layui-this { background: rgba(22,186,170,.10) !important; color: #16baaa !important; }

/* 代码生成器：模板参数预览的字段表，限制列宽避免 primaryKey 被挤出可视区 */
.ctx-columns table { table-layout: fixed !important; width: 100% !important; }
.ctx-columns th:nth-child(1) { width: 15% !important; }
.ctx-columns th:nth-child(2) { width: 14% !important; }
.ctx-columns th:nth-child(3) { width: 15% !important; }
.ctx-columns th:nth-child(4) { width: 24% !important; }
.ctx-columns th:nth-child(6) { width: 10% !important; }
.ctx-columns td { overflow: hidden; text-overflow: ellipsis; white-space: normal; word-break: normal; overflow-wrap: anywhere; vertical-align: middle; }
.ctx-columns td, .ctx-columns th { padding: 7px 8px !important; }

/* ---------- layui.table 官方数据表格：深色主题 ---------- */
.sd-layui-table-view,
.sd-layui-table-view .layui-table,
.sd-layui-table-view .layui-table-header,
.sd-layui-table-view .layui-table-body { background: #1f2228 !important; color: #c2ccd8; }
.sd-layui-table-view { border: 0 !important; border-radius: 0; overflow: hidden; margin: 4px 0 16px; }
/* layui 会在表格容器右侧生成 1px #eee 的 ::after 竖线，必须显式移除 */
.sd-layui-table-view::after { content: none !important; display: none !important; border: 0 !important; }
/* 去掉表格顶部、右侧的浅色边线：表头/表体/主区域边框统一消失 */
.sd-layui-table-view .layui-table-header,
.sd-layui-table-view .layui-table-body,
.sd-layui-table-view .layui-table-main,
.sd-layui-table-view .layui-table-box,
.sd-layui-table-view .layui-table { border-top: 0 !important; border-right: 0 !important; }
.sd-layui-table-view .layui-table-header th:last-child,
.sd-layui-table-view .layui-table-body td:last-child { border-right: 0 !important; }
.sd-layui-table-view .layui-table-header { border-bottom: 1px solid #2a303a !important; }
.sd-layui-table-view .layui-table-header th { height: 40px; }
.sd-layui-table-view .layui-table-header .layui-table-cell { height: 40px; line-height: 40px; }
.sd-layui-table-view .layui-table { border-color: #2a303a !important; }
.sd-layui-table-view .layui-table th,
.sd-layui-table-view .layui-table td { border-color: #2a303a !important; }
.sd-layui-table-view .layui-table-header th { background: #262b34 !important; color: #aab5c2 !important; font-weight: 600; }
.sd-layui-table-view .layui-table-body td { color: #c2ccd8; background-color: #1f2228 !important; }
.sd-layui-table-view .layui-table[lay-even] tbody tr:nth-child(even),
.sd-layui-table-view .layui-table tbody tr:nth-child(even),
.sd-layui-table-view .layui-table[lay-even] tbody tr:nth-child(even) td,
.sd-layui-table-view .layui-table tbody tr:nth-child(even) td { background-color: #1f2228 !important; }
.sd-layui-table-view .layui-table tbody tr:hover,
.sd-layui-table-view .layui-table tbody tr:hover td,
.sd-layui-table-view .layui-table-hover,
.sd-layui-table-view .layui-table-hover td,
.sd-layui-table-view .layui-table-click,
.sd-layui-table-view .layui-table-click td { background-color: #232a33 !important; }
.sd-layui-table-view .layui-table-cell { height: auto; min-height: 48px; line-height: 46px; padding-left: 14px; padding-right: 14px; color: #c2ccd8; }
.sd-layui-table-view .layui-table-body { overflow-x: hidden; }
.sd-layui-table-view .layui-table-page { background: #1c2027; border-color: #242a34; }
.sd-layui-table-view .layui-table-page .layui-laypage a,
.sd-layui-table-view .layui-table-page .layui-laypage span { background: #1a1d24; border-color: #2a3038; color: #aab4c1; }
.sd-layui-table-view .layui-table-page .layui-laypage .layui-laypage-curr .layui-laypage-em { background: #16baaa; }
.sd-layui-table-view .layui-table-page .layui-laypage .layui-laypage-curr em { color: #fff; }
.sd-layui-table-view .layui-table-tool { background: #1a1d24; border-color: #242a34; }
.sd-layui-table-view .layui-table-sort .layui-table-sort-asc,
.sd-layui-table-view .layui-table-sort .layui-table-sort-desc { color: #5f6d7e; }
.sd-layui-table-view .layui-table-sort .layui-table-sort-asc.layui-table-sort-active,
.sd-layui-table-view .layui-table-sort .layui-table-sort-desc.layui-table-sort-active { color: #16baaa; }
.sd-layui-table { min-width: 0; }

/* 服务列表 layui.table 单元格 */
.svc-row { cursor: pointer; }
.svc-name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.svc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: #dfe6ee; }
.svc-desc-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8f9dad; font-size: 12px; }
.pin-btn.layui-btn { width: 22px; min-width: 22px; height: 22px; line-height: 20px; padding: 0; border: 0; background: transparent; color: #77879a; }
.pin-btn.layui-btn:hover { color: #ffb800; background: rgba(255,184,0,.10); }
.pin-btn.layui-btn.active { color: #ffb800; }
.pin-btn .layui-icon { font-size: 15px; }
.svc-ops { display: flex; justify-content: flex-end; align-items: center; gap: 3px; white-space: nowrap; }
.svc-ops .layui-btn.svc-op { width: 24px; min-width: 24px; height: 24px; line-height: 22px; padding: 0; margin: 0; border-color: #2b323d; background: #20252d; color: #9fabb9; }
.svc-ops .layui-btn.svc-op:hover:not(:disabled) { color: #16baaa; border-color: #16baaa; }
/* 操作按钮按动作区分颜色：启动绿 / 停止红 / 重启琥珀 / 详情青 */
.svc-ops .svc-op-start { color: #7ddc92 !important; border-color: rgba(125,220,146,.45) !important; background: rgba(125,220,146,.10) !important; }
.svc-ops .svc-op-start:hover:not(:disabled) { color: #a6efb5 !important; border-color: #7ddc92 !important; background: rgba(125,220,146,.18) !important; }
.svc-ops .svc-op-stop { color: #ff8a72 !important; border-color: rgba(255,87,34,.45) !important; background: rgba(255,87,34,.10) !important; }
.svc-ops .svc-op-stop:hover:not(:disabled) { color: #ffb59f !important; border-color: #ff5722 !important; background: rgba(255,87,34,.18) !important; }
.svc-ops .svc-op-restart { color: #ffc46b !important; border-color: rgba(255,184,0,.45) !important; background: rgba(255,184,0,.10) !important; }
.svc-ops .svc-op-restart:hover:not(:disabled) { color: #ffdc9e !important; border-color: #ffb800 !important; background: rgba(255,184,0,.18) !important; }
.svc-ops .svc-op-detail { color: #5cd6cc !important; border-color: rgba(22,186,170,.45) !important; background: rgba(22,186,170,.10) !important; }
.svc-ops .svc-op-detail:hover:not(:disabled) { color: #8be9e1 !important; border-color: #16baaa !important; background: rgba(22,186,170,.18) !important; }
.svc-ops .layui-btn.svc-op:disabled { opacity: .55; cursor: not-allowed; filter: saturate(.45); }
.svc-ops .layui-btn.svc-op.is-locked { opacity: .62; filter: saturate(.6); }
.svc-ops .layui-btn.svc-op.is-locked:hover { opacity: .85; }
.svc-ops .layui-icon { font-size: 13px; }
.table-ops { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.table-ops .layui-btn { height: 24px; line-height: 22px; padding: 0 8px; margin: 0; }
.table-ops .layui-btn[lay-event="edit"],
.table-ops .layui-btn[lay-event="toggle"],
.table-ops .layui-btn[lay-event="view"] { background: #16baaa !important; border-color: #16baaa !important; color: #fff !important; }
.table-ops .layui-btn[lay-event="delete"],
.table-ops .layui-btn[lay-event="close"] { background: #ff5722 !important; border-color: #ff5722 !important; color: #fff !important; }
.table-ops .layui-icon { font-size: 12px; }

/* 业务按钮最终配色（覆盖 layui bridge 追加的 layui-btn-* 默认色） */
.btn.btn-primary,
.btn.btn-primary.layui-btn-normal { background: #16baaa !important; border-color: #16baaa !important; color: #fff !important; }
.btn.btn-primary:hover,
.btn.btn-primary.layui-btn-normal:hover { background: #21c4b4 !important; border-color: #21c4b4 !important; color: #fff !important; }
.btn.btn-danger,
.btn.btn-danger.layui-btn-danger { background: rgba(255, 87, 34, .16) !important; border-color: rgba(255, 87, 34, .55) !important; color: #ffb3a7 !important; }
.btn.btn-danger:hover,
.btn.btn-danger.layui-btn-danger:hover { background: rgba(255, 87, 34, .26) !important; border-color: #ff5722 !important; color: #ffd0c6 !important; }
.btn.btn-warn { background: rgba(255, 184, 0, .14) !important; border-color: rgba(255, 184, 0, .5) !important; color: #ffd98a !important; }
.btn.btn-warn:hover { background: rgba(255, 184, 0, .24) !important; border-color: #ffb800 !important; color: #ffe7b0 !important; }
.btn.btn-success { background: rgba(125, 220, 146, .14) !important; border-color: rgba(125, 220, 146, .5) !important; color: #a6efb5 !important; }
.btn.btn-success:hover { background: rgba(125, 220, 146, .24) !important; border-color: #7ddc92 !important; color: #c8f7d1 !important; }
.btn.btn-accent { background: rgba(22, 186, 170, .12) !important; border-color: rgba(22, 186, 170, .5) !important; color: #7fe7dd !important; }
.btn.btn-accent:hover { background: rgba(22, 186, 170, .22) !important; border-color: #16baaa !important; color: #b2fff7 !important; }
.btn:disabled,
.btn.layui-btn-disabled { opacity: .5 !important; cursor: not-allowed !important; }

/* 停止操作：实心红色、始终可用；避免看起来像禁用按钮 */
.btn.btn-stop { background: #d93a3f !important; border-color: #d93a3f !important; color: #fff !important; }
.btn.btn-stop:hover { background: #ee4a4f !important; border-color: #ee4a4f !important; color: #fff !important; }
.btn.btn-stop:active { background: #c23136 !important; border-color: #c23136 !important; }

/* 下载 / 导出：统一蓝色实心按钮，所有入口共用同一配色 */
.btn.btn-download { background: #2f7cf6 !important; border-color: #2f7cf6 !important; color: #fff !important; }
.btn.btn-download:hover { background: #1f6be0 !important; border-color: #1f6be0 !important; color: #fff !important; }
.btn.btn-download:active { background: #195fc9 !important; border-color: #195fc9 !important; }
.btn.btn-download .layui-icon { color: #fff !important; }

/* 父菜单右侧展开箭头：与父菜单标题垂直居中（layui 默认箭头 top:0 会偏高） */
.layui-nav-tree .layui-nav-item > a .layui-nav-more,
.layui-nav-tree .layui-nav-item > a .layui-icon-down {
    top: 50% !important;
    margin-top: -8px !important;
}
/* 展开/收起使用同一个垂直中心；旋转 180° 不改变字形外框，统一 -8px 最稳 */
.layui-nav-tree .layui-nav-itemed > a .layui-nav-more {
    margin-top: -8px !important;
}

/* 父菜单图标与标题：整行 flex 垂直居中，去掉上下 padding 造成的 5px 下移 */
.layui-nav-tree.sd-nav .sd-nav-group,
.layui-nav-tree.sd-nav .sd-nav-parent-link {
    display: flex !important;
    align-items: center !important;
    height: 44px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: normal !important;
}

/* 列表项手型光标：layui 只给 tr 光标，td / cell 仍需显式继承，否则悬停正文时变回箭头 */
.sd-layui-table-view .layui-table-body tbody tr,
.sd-layui-table-view .layui-table-body tbody tr td,
.sd-layui-table-view .layui-table-body tbody tr .layui-table-cell,
.sd-layui-table-view .layui-table-body tbody tr .layui-table-cell *,
.sd-layui-table-view .layui-table-body tbody tr.sd-row-clickable,
.sd-layui-table-view .layui-table-body tbody tr.sd-row-clickable td,
.sd-layui-table-view .layui-table-body tbody tr.sd-row-clickable .layui-table-cell,
.sd-layui-table-view .layui-table-body tbody tr.sd-row-clickable .layui-table-cell *,
.sd-layui-table-view .layui-table-body tbody tr.svc-row,
.sd-layui-table-view .layui-table-body tbody tr.svc-row td,
.sd-layui-table-view .layui-table-body tbody tr.svc-row .layui-table-cell,
.sd-layui-table-view .layui-table-body tbody tr.svc-row .layui-table-cell * { cursor: pointer; }
/* 行内操作按钮仍按按钮语义显示手型；禁用按钮保持 not-allowed */
.sd-layui-table-view .layui-table-body tbody tr .layui-btn-disabled,
.sd-layui-table-view .layui-table-body tbody tr button:disabled { cursor: not-allowed !important; }

/* 列表正文统一垂直居中：layui 的 cell 是 block + 固定 line-height，内容会贴在顶部 */
.sd-layui-table-view .layui-table-body td .layui-table-cell {
    display: flex !important;
    align-items: center !important;
    height: auto !important;
    min-height: 48px;
    line-height: 1.5 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.sd-layui-table-view .layui-table-body td[style*="text-align: center"] .layui-table-cell,
.sd-layui-table-view .layui-table-body td[style*="text-align:center"] .layui-table-cell { justify-content: center; }
.sd-layui-table-view .layui-table-body td[style*="text-align: right"] .layui-table-cell,
.sd-layui-table-view .layui-table-body td[style*="text-align:right"] .layui-table-cell { justify-content: flex-end; }

/* 表头与内容统一靠左：同一列标题、状态、数值、操作都从左侧同一基线开始 */
.sd-layui-table-view .layui-table-header .layui-table-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: 40px;
    line-height: 1.5 !important;
    padding-left: 14px !important;
    padding-right: 10px !important;
}
.sd-layui-table-view .layui-table-body td .layui-table-cell,
.sd-layui-table-view .layui-table-body td[style*="text-align: center"] .layui-table-cell,
.sd-layui-table-view .layui-table-body td[style*="text-align:center"] .layui-table-cell,
.sd-layui-table-view .layui-table-body td[style*="text-align: right"] .layui-table-cell,
.sd-layui-table-view .layui-table-body td[style*="text-align:right"] .layui-table-cell {
    justify-content: flex-start !important;
    padding-left: 14px !important;
    padding-right: 10px !important;
}
.sd-layui-table-view .layui-table-header th { text-align: left !important; }
.svc-table thead th { text-align: left !important; }
.svc-table .svc-col-ops { width: 152px !important; }
.sd-layui-table-view .svc-ops {
    display: inline-flex !important;
    align-items: center;
    gap: 8px !important;
    justify-content: flex-start !important;
}
.sd-layui-table-view .svc-ops .layui-btn.svc-op,
.sd-layui-table-view .svc-ops .icon-btn { margin-left: 0 !important; margin-right: 0 !important; }
.table-ops { justify-content: flex-start !important; gap: 8px !important; }

/* 搜索 / 筛选控件：固定基准宽度，不参与 flex 收缩，避免窗口或侧栏变化时被压成很短 */
.toolbar .field { flex: 0 0 auto; min-width: 0; }
.toolbar .field .input,
.toolbar .field .select,
.toolbar .field .combo { flex: 0 0 auto; min-width: 96px; max-width: none; }
.toolbar .field .input[style*="min-width"] { flex-basis: 220px; }

/* 页面根节点带 layui-form 时，layui 默认会隐藏所有原生 select；
   本项目已不再统一 form.render('select')，这里让未被增强的普通下拉正常显示 */
body.layui-form select.select:not([data-combo-enhanced]) {
    display: inline-block !important;
}

/* ------------------------------------------------------------------
 * laydate 日期时间选择器：改为与系统一致的暗色主题，保证年月、日期、时间与按钮都清晰可读
 * ------------------------------------------------------------------ */
.layui-laydate,
.layui-laydate-main,
.layui-laydate-header,
.layui-laydate-content,
.layui-laydate-footer {
    background: var(--panel) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
}
.layui-laydate {
    border: 1px solid var(--line) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .55) !important;
}
.layui-laydate-header { border-bottom: 1px solid var(--line-soft) !important; }
.layui-laydate-footer { border-top: 1px solid var(--line-soft) !important; }
.layui-laydate .laydate-set-ym span,
.layui-laydate .laydate-set-ym span:hover,
.layui-laydate-header i,
.layui-laydate-content th,
.layui-laydate-content td,
.layui-laydate-content td > div {
    color: var(--text) !important;
}
.layui-laydate-header i { color: var(--muted) !important; }
.layui-laydate-header i:hover { color: var(--accent-2) !important; }
.layui-laydate-content table,
.layui-laydate-content td,
.layui-laydate-content th { background: transparent !important; }
.layui-laydate-content th { color: var(--muted) !important; font-weight: 500 !important; }
.layui-laydate-content td { border-color: var(--line-soft) !important; }
.layui-laydate-content td > div:hover,
.layui-laydate-content td:hover > div {
    background: var(--panel-2) !important;
    color: var(--accent-2) !important;
}
.layui-laydate-content td.laydate-selected > div {
    background: var(--accent) !important;
    color: #fff !important;
}
.layui-laydate-content td.laydate-day-prev > div,
.layui-laydate-content td.laydate-day-next > div,
.layui-laydate-content td.laydate-disabled > div {
    color: var(--muted-2) !important;
}
.laydate-footer-btns span,
.laydate-btns-time {
    color: var(--text) !important;
    background: var(--panel-2) !important;
    border: 1px solid var(--line) !important;
    border-radius: 2px !important;
}
.laydate-footer-btns span:hover,
.laydate-btns-time:hover {
    color: var(--accent-2) !important;
    border-color: var(--accent) !important;
}
.laydate-footer-btns .laydate-btns-confirm { color: var(--accent-2) !important; }
.laydate-time-list,
.laydate-time-list ol,
.laydate-time-list li,
.laydate-time-list li ol li {
    background: var(--panel) !important;
    color: var(--text) !important;
    border-color: var(--line-soft) !important;
}
.laydate-time-list li ol li:hover,
.laydate-time-list li ol li.laydate-time-selected {
    background: var(--panel-2) !important;
    color: var(--accent-2) !important;
}

/* ===== 防火墙管理 ===== */
.fw-panel { padding: 14px 16px; }
.fw-status { display: flex; align-items: center; gap: 14px; min-height: 48px; }
.fw-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 4px rgba(255,255,255,.03); }
.fw-dot.ok { background: #7ddc92; }
.fw-dot.warn { background: #ffc46b; }
.fw-dot.danger { background: #ff7b5f; }
.fw-status-main { min-width: 0; }
.fw-status-title { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 600; }
.fw-status-detail { margin-top: 4px; color: var(--muted-2); font-size: 12.5px; }
.fw-status-meta { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--muted-2); font-size: 12px; text-align: right; }
.fw-warn { color: #ffc46b; }
.fw-alert { margin: 0 0 12px; padding: 9px 12px; border: 1px solid rgba(255,123,95,.28); border-radius: 4px; background: rgba(255,123,95,.07); color: #ffb3a7; font-size: 12.5px; }
.fw-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; margin-left: 8px; padding: 0 6px; border-radius: 9px; background: rgba(22,186,170,.12); color: var(--accent-2); font-size: 11px; font-weight: 500; }
.fw-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fw-name > div { min-width: 0; flex: 1; }
.fw-name-main { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.35; word-break: break-word; }
.fw-name i { color: var(--accent); flex: none; }
.fw-name-sub { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 11.5px; }
.fw-origin { flex: none; padding: 1px 6px; border: 1px solid var(--line-soft); border-radius: 3px; color: var(--muted-2); font-size: 11px; }
.fw-origin.is-managed { border-color: rgba(22,186,170,.3); background: rgba(22,186,170,.08); color: #a9ded7; }
.fw-port { display: flex; align-items: center; flex-wrap: wrap; gap: 0 1px; color: #cfe9e5; font-size: 12.5px; }
.fw-port > span { white-space: nowrap; }
.fw-port-sep { color: var(--muted-2); }
.fw-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 0; }
.fw-chip { display: inline-flex; align-items: center; height: 20px; max-width: 150px; padding: 0 7px; border: 1px solid rgba(22,186,170,.24); border-radius: 3px; background: rgba(22,186,170,.07); color: #a9ded7; font-family: var(--mono); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-chip.is-scope { border-color: rgba(255,196,107,.25); background: rgba(255,196,107,.06); color: #e2c58f; font-family: inherit; }
.fw-chip.muted { border-color: var(--line-soft); background: transparent; color: var(--muted-2); }
.sd-form > .field.fw-field-wide { align-items: start; }
.sd-form > .field.fw-field-wide > label { padding-top: 9px; }
.sd-form > .field.fw-field-wide > .textarea { min-height: 88px; }
.sd-form > .field.fw-field-wide > .hint { margin-top: -4px; }
/* ---------- 防火墙搜索栏 / 进程管理 / 文件管理 / 命令执行记录 ---------- */
.fw-toolbar { margin-bottom: 10px; }
.fw-search-count { min-width: 120px; height: 32px; display: flex; align-items: center; color: var(--muted); font-size: 12.5px; }
.table-ops { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.table-ops .layui-btn { height: 24px; line-height: 24px; padding: 0 8px; }
.table-ops .layui-btn[disabled] { cursor: not-allowed; opacity: .45; }

.kv-line { font-size: 12.8px; color: var(--text); word-break: break-all; line-height: 1.6; }
.kv-line.mono { font-family: var(--mono); font-size: 12.2px; }

.proc-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.proc-name-main { font-size: 12.8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc-service { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border: 1px solid rgba(22,186,170,.24); border-radius: 3px; background: rgba(22,186,170,.07); color: #a9ded7; font-size: 11px; white-space: nowrap; }
.proc-status { color: var(--muted-2); font-size: 11px; white-space: nowrap; }
.proc-command { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.proc-cmd-full,
.cmd-pre { margin: 0; padding: 10px 12px; max-height: 340px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 4px; background: rgba(0,0,0,.22); color: #cfe9e5; font-family: var(--mono); font-size: 12.2px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }

.cmd-text { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.2px; color: #cfe9e5; }
.cmd-source { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.cmd-source-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.45; }
.cmd-source-desc { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.5; color: #cfd8d6; word-break: break-all; }
.cmd-toolbar { margin-bottom: 10px; }
.cmd-toolbar .field .input[type="date"] { width: 150px; }

.file-toolbar { margin-bottom: 10px; gap: 10px; }
.file-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; font-size: 12.5px; }
.file-crumbs > .layui-icon { margin-right: 6px; color: var(--accent-2); }
.file-crumb { border: 0; background: transparent; padding: 2px 4px; border-radius: 3px; color: var(--muted); cursor: pointer; font-size: 12.5px; }
.file-crumb:hover { background: rgba(22,186,170,.08); color: var(--text); }
.file-crumb.is-active { color: var(--accent-2); }
.file-crumb-sep { color: var(--muted-2); }
.file-root { margin-left: 10px; font-family: var(--mono); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46%; }
.file-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.file-name .layui-icon { color: var(--accent-2); flex: 0 0 auto; }
.file-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-ip-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.file-ip-row:last-child { border-bottom: none; }
.file-ip-row .spacer { flex: 1; }
.file-ip-add { display: flex; align-items: center; gap: 8px; }
.file-ip-add .input { height: 32px; }
/* ---------- 防火墙协议配色：不同协议一眼可辨 ---------- */
.badge.proto { font-weight: 600; letter-spacing: .4px; }
.badge.proto-tcp { color: #7ee3c8; border-color: rgba(22,186,170,.42); background: rgba(22,186,170,.12); }
.badge.proto-udp { color: #8fc4ff; border-color: rgba(74,144,226,.42); background: rgba(74,144,226,.12); }
.badge.proto-icmp { color: #ffcf87; border-color: rgba(255,196,107,.42); background: rgba(255,196,107,.1); }
.badge.proto-other { color: #c9c9d4; border-color: rgba(160,160,180,.38); background: rgba(160,160,180,.1); }

/* ---------- 文件管理（XFTP 式布局） ---------- */
.file-layout { display: flex; align-items: flex-start; gap: 12px; }
.file-side {
    flex: 0 0 218px; width: 218px; padding: 10px 8px; border: 1px solid var(--line-soft);
    border-radius: 6px; background: rgba(255,255,255,.015);
}
.file-side-title { display: flex; align-items: center; gap: 6px; padding: 2px 6px 8px; color: var(--muted); font-size: 12.5px; }
.file-side-title .layui-icon { color: var(--accent-2); }
.file-side-list { display: flex; flex-direction: column; gap: 3px; max-height: calc(100vh - 300px); overflow: auto; }
.file-side-item {
    display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 7px 8px; border: 1px solid transparent;
    border-radius: 5px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font-size: 12.5px;
}
.file-side-item:hover { background: rgba(22,186,170,.07); }
.file-side-item.is-active { border-color: rgba(22,186,170,.4); background: rgba(22,186,170,.1); }
.file-side-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.file-side-name .layui-icon { color: var(--accent-2); flex: 0 0 auto; }
.file-side-meta { color: var(--muted-2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-side-empty { padding: 10px 6px; font-size: 12px; }
.file-panel { min-height: 320px; }
.file-address { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.file-path-input { flex: 1; min-width: 220px; font-family: var(--mono); font-size: 12.5px; }
.file-crumbs { margin: 2px 0 10px; }
.file-search-field { margin-left: auto; }
.file-search-field .input { width: 190px; height: 30px; }
.file-mode { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.file-owner { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-tag {
    flex: 0 0 auto; padding: 0 5px; border: 1px solid rgba(255,196,107,.42); border-radius: 3px;
    color: #ffcf87; background: rgba(255,196,107,.1); font-size: 10.5px; line-height: 16px;
}
.file-ops { flex-wrap: wrap; }
.file-meta-line { margin-bottom: 8px; font-size: 12px; }
.file-preview {
    margin: 0; padding: 12px 14px; max-height: 56vh; overflow: auto; border: 1px solid var(--line-soft);
    border-radius: 5px; background: rgba(0,0,0,.22); color: #cfe9e5; font-size: 12.4px; line-height: 1.65;
    white-space: pre-wrap; word-break: break-word;
}
.file-editor {
    width: 100%; height: 56vh; min-height: 260px; padding: 12px 14px; border: 1px solid var(--line-soft);
    border-radius: 5px; background: rgba(0,0,0,.22); color: #cfe9e5; font-size: 12.4px; line-height: 1.65;
    resize: vertical; outline: none;
}
.file-editor:focus { border-color: rgba(22,186,170,.45); }
.file-preview-image { text-align: center; max-height: 62vh; overflow: auto; }
.file-preview-image img { max-width: 100%; max-height: 60vh; border-radius: 4px; }
@media (max-width: 900px) {
    .file-layout { flex-direction: column; }
    .file-side { flex: none; width: 100%; }
    .file-side-list { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- 首页快捷入口：按用户自定义 ---------- */
.ov-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ov-shortcut {
    display: flex; flex-direction: column; gap: 8px; cursor: pointer;
    border: 1px solid var(--line-soft); transition: border-color .15s, background .15s, transform .15s;
}
.ov-shortcut:hover { border-color: rgba(22,186,170,.45); background: rgba(22,186,170,.07); transform: translateY(-1px); }
.ov-shortcut-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ov-shortcut-head .layui-icon { font-size: 18px; color: var(--accent-2); flex: 0 0 auto; }
.ov-shortcut-head .stat-label { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-shortcut .stat-foot { color: var(--muted); line-height: 1.45; }
.ov-shortcut-picker {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
    max-height: 56vh; overflow: auto; padding-right: 2px;
}
.ov-shortcut-option {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-soft);
    border-radius: 6px; background: rgba(255,255,255,.015); cursor: pointer; transition: border-color .15s, background .15s;
}
.ov-shortcut-option:hover { border-color: rgba(22,186,170,.4); background: rgba(22,186,170,.06); }
.ov-shortcut-option:has(input:checked) { border-color: rgba(22,186,170,.55); background: rgba(22,186,170,.1); }
.ov-shortcut-option input { accent-color: var(--accent); flex: 0 0 auto; width: 15px; height: 15px; cursor: pointer; }
.ov-shortcut-option-main { display: flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.ov-shortcut-option-main .layui-icon { color: var(--accent-2); }
.ov-shortcut-option-desc { margin-left: auto; color: var(--muted-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
    .ov-shortcuts, .ov-shortcut-picker { grid-template-columns: 1fr; }
    .ov-shortcut-option-desc { display: none; }
}

/* ---------- 服务启停：持续可见的操作结果 ---------- */
.svc-action-result {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 9px 12px;
    border: 1px solid var(--line-soft); border-left-width: 3px; border-radius: 5px;
    background: rgba(255,255,255,.02); font-size: 12.5px; line-height: 1.5;
}
.svc-action-result .layui-icon { font-size: 15px; flex: 0 0 auto; }
.svc-action-result.busy { border-left-color: var(--accent); color: var(--accent-2); }
.svc-action-result.ok { border-left-color: var(--ok); background: rgba(95,184,120,.08); color: #86d6a2; }
.svc-action-result.fail { border-left-color: var(--danger); background: rgba(255,87,34,.08); color: #ff9b7f; }
.svc-action-result.ok .layui-icon { color: var(--ok); }
.svc-action-result.fail .layui-icon { color: var(--danger); }
.svc-op.is-busy { opacity: .55; cursor: wait; }

/* ---------- 日志 IP 标注 ---------- */
.ip-cell { display:inline-flex; align-items:center; gap:6px; max-width:100%; min-width:0; }
.ip-family { flex:0 0 auto; padding:1px 4px; border-radius:3px; font-size:10px; line-height:1.45; letter-spacing:.2px; }
.ip-family.v4 { color:#86d6a2; background:rgba(95,184,120,.12); border:1px solid rgba(95,184,120,.28); }
.ip-family.v6 { color:#8cc9ff; background:rgba(70,148,255,.12); border:1px solid rgba(70,148,255,.28); }
.log-ip { margin-left:3px; vertical-align:baseline; min-width:0; overflow-wrap:anywhere; word-break:normal; white-space:normal; }

/* ---------- 文件收藏 ---------- */
.file-side-section { margin-top:10px; }
.file-side-fav { padding:7px 9px; }
.file-side-fav .file-side-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-side-fav .layui-icon-star-fill { color:#e6a23c; }
.file-side-fav .layui-icon-star { color:var(--muted); }
.file-fav-btn.is-fav { color:#e6a23c; border-color:rgba(230,162,60,.4); }
.row-highlight { background:rgba(22,186,170,.12) !important; }

/* ---------- 证书/解析详情与查询条件 ---------- */
.ssl-detail-grid {
    display:grid; grid-template-columns:108px minmax(0,1fr); gap:9px 16px; align-items:start;
    font-size:12.8px;
}
.ssl-detail-grid .k { color:var(--muted); line-height:1.8; }
.ssl-detail-grid .v { color:var(--text); line-height:1.8; word-break:break-all; }
.break-all { word-break:break-all; }
.dom-domain-select { height:30px; min-width:180px; max-width:260px; }
.dom-provider { height:30px; width:170px; margin-left:10px; }
.dom-filter { height:30px; }
.dom-filter#dom-filter-sub { width:180px; }
.dom-filter#dom-filter-type { width:120px; }



/* ---------- 全局执行遮罩 ---------- */
.sd-busy-overlay {
    position:fixed; inset:0; z-index:2147483000; display:flex; align-items:center; justify-content:center;
    background:rgba(9, 14, 24, .74); backdrop-filter:blur(2px); cursor:progress;
    touch-action:none; user-select:none;
}
.sd-busy-overlay[hidden] { display:none !important; }
.sd-busy-card {
    min-width:280px; max-width:88vw; padding:26px 34px 22px; border-radius:12px;
    background:rgba(24, 32, 46, .96); border:1px solid rgba(120, 170, 255, .22);
    box-shadow:0 18px 50px rgba(0,0,0,.45); text-align:center; color:var(--text);
}
.sd-busy-spinner {
    display:block; width:34px; height:34px; margin:0 auto 14px; border-radius:50%;
    border:3px solid rgba(120,170,255,.18); border-top-color:#5aa2ff; border-right-color:#3dd6c4;
    animation:sd-busy-spin .9s linear infinite;
}
.sd-busy-title { font-size:14px; font-weight:600; line-height:1.6; }
.sd-busy-tip { margin-top:6px; font-size:11.5px; color:var(--muted); line-height:1.6; }
@keyframes sd-busy-spin { to { transform:rotate(360deg); } }

/* ---------- TOTP 绑定：二维码 + 获取步骤 ---------- */
.totp-setup { display:flex; gap:26px; align-items:flex-start; }
.totp-qr-side { flex:0 0 220px; }
.totp-qr-box {
    position:relative; width:200px; height:200px; margin:0 auto; padding:0;
    background:#fff; border:1px solid var(--line); border-radius:10px; overflow:hidden;
}
.totp-qr { display:flex; align-items:center; justify-content:center; width:200px; height:200px; }
.totp-qr canvas, .totp-qr img { display:block; width:200px !important; height:200px !important; }
.totp-qr-logo {
    position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:none;
}
.totp-qr-logo .sd-logo-mark {
    width:34px; height:34px; line-height:34px; font-size:15px; border-radius:7px;
    box-shadow:0 0 0 5px #fff, 0 2px 8px rgba(15, 23, 42, .28);
}
.totp-info-side { flex:1; min-width:0; }
.totp-secret {
    padding:9px 11px; border:1px solid var(--line); border-radius:8px;
    background:var(--panel-2); word-break:break-all; font-size:12px; line-height:1.6;
}
.totp-steps-bar { display:flex; align-items:center; gap:14px; margin-top:16px; padding-top:14px; border-top:1px solid var(--line-soft); }
.totp-download { color:var(--accent-2); font-size:12.5px; text-decoration:underline; }
.totp-download:hover { color:var(--accent); }
.totp-steps { margin-top:12px; padding:14px 16px; border:1px solid var(--line-soft); border-radius:10px; background:var(--panel-2); }
.totp-step { display:flex; gap:10px; margin-bottom:12px; font-size:12.5px; line-height:1.75; color:var(--muted); }
.totp-step:last-of-type { margin-bottom:8px; }
.totp-step b { color:var(--text); font-weight:600; }
.totp-step-no {
    flex:0 0 20px; width:20px; height:20px; line-height:20px; text-align:center; margin-top:2px;
    border-radius:50%; background:var(--accent-soft); color:var(--accent-2); font-size:11.5px; font-weight:700;
}
@media (max-width: 680px) {
    .totp-setup { flex-direction:column; }
    .totp-qr-side { flex-basis:auto; width:100%; }
    .totp-steps-bar { flex-wrap:wrap; }
}
