/* ==========================================================================
 * static/css/admin_config.css — 阶段 6B C2 迁出：admin_config.html 三个内联样式块。
 * 规则文本逐字搬迁，保持基线先后顺序，未重排特异性、未改选择器与属性。
 ========================================================================== */
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background: #0f1923; color: #e0e0e0; min-height: 100vh;
        }
        .container { max-width: 1600px; margin: 0 auto; padding: 16px; }

        /* 导航栏 */
        .nav {
            display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
        }
        .nav a {
            padding: 8px 18px; background: #111d2c; border: 1px solid #1a2a3e; border-radius: 8px;
            color: #7a8a9a; text-decoration: none; font-size: 13px; transition: 0.2s;
        }
        .nav a:hover { background: #1a2a3e; border-color: #4fc3f7; color: #fff; }
        .nav a.active { background: #1a2a3e; border-color: #4fc3f7; color: #4fc3f7; }
        .nav a.home-link { background: #0d2137; border-color: #1565c0; color: #64b5f6; }
        .nav a.home-link:hover { background: #1565c0; color: #fff; }

        /* 主布局：侧边栏 + 内容 */
        .main-layout { display: flex; gap: 16px; align-items: flex-start; }

        /* 侧边栏 */
        .sidebar {
            width: 200px; flex-shrink: 0;
            background: #111d2c; border: 1px solid #1a2a3e; border-radius: 10px;
            padding: 12px 0; transition: width 0.3s, padding 0.3s, opacity 0.3s;
            overflow: hidden;
        }
        .sidebar.collapsed {
            width: 0; padding: 0; border: none; opacity: 0;
        }
        .sidebar-header {
            display: flex; justify-content: space-between; align-items: center;
            padding: 0 14px 10px; border-bottom: 1px solid #1a2a3e;
        }
        .sidebar-header .title { font-size: 13px; color: #5a7a9a; letter-spacing: 1px; }
        .sidebar-toggle {
            background: none; border: none; color: #5a7a9a; cursor: pointer;
            font-size: 18px; padding: 2px 6px; border-radius: 4px;
        }
        .sidebar-toggle:hover { background: #1a2a3e; color: #fff; }
        /* 侧边栏折叠后显示的展开按钮 */
        .sidebar-reveal {
            display: none; width: 36px; flex-shrink: 0;
            background: #111d2c; border: 1px solid #1a2a3e; border-radius: 10px;
            padding: 10px 0; cursor: pointer; font-size: 20px;
            color: #5a7a9a; text-align: center; transition: 0.2s;
            align-items: center; justify-content: center;
        }
        .sidebar-reveal:hover { background: #1a2a3e; color: #fff; }
        .sidebar.collapsed + .sidebar-reveal { display: flex; }
        .sidebar-item {
            padding: 10px 16px; cursor: pointer; font-size: 13px;
            color: #7a8a9a; transition: 0.15s; display: flex; align-items: center; gap: 8px;
            border-left: 3px solid transparent;
        }
        .sidebar-item:hover { background: #15202e; color: #e0e0e0; }
        .sidebar-item.active { background: #15202e; color: #4fc3f7; border-left-color: #4fc3f7; }
        .sidebar-item .icon { font-size: 16px; }

        /* 内容区 */
        .content {
            flex: 1; min-width: 0;
            background: #111d2c; border: 1px solid #1a2a3e; border-radius: 10px; padding: 20px;
        }
        .content h2 { font-size: 16px; color: #4fc3f7; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

        /* 通用设置卡片 */
        .config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
        .config-card {
            background: #0f1923; border: 1px solid #1a2a3e; border-radius: 8px; padding: 12px 14px;
        }
        .config-card .key {
            font-family: monospace; font-size: 12px; color: #4fc3f7; margin-bottom: 4px;
        }
        .config-card .value {
            font-size: 14px; padding: 4px 8px; background: #0a0e17; border-radius: 4px;
            word-break: break-all; margin-bottom: 4px;
        }
        .config-card .desc { font-size: 11px; color: #5a6a7a; margin-bottom: 6px; }
        .config-card .actions { display: flex; gap: 6px; }
        .config-card .actions button {
            padding: 3px 10px; border-radius: 4px; border: none; cursor: pointer; font-size: 11px;
        }
        .btn-edit { background: #2a3a4e; color: #4fc3f7; }
        .btn-edit:hover { background: #4fc3f7; color: #0f1923; }
        .btn-save { background: #2e7d32; color: #fff; }
        .btn-save:hover { background: #388e3c; }
        .btn-cancel { background: #4a4a4a; color: #aaa; }
        .btn-cancel:hover { background: #5a5a5a; }
        .config-edit-input {
            width: 100%; padding: 4px 8px; border: 1px solid #1a2a3e; border-radius: 4px;
            background: #0a0e17; color: #e0e0e0; font-size: 13px; font-family: monospace;
            margin-bottom: 6px;
        }
        .badge {
            display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 10px;
        }
        .badge.interval { background: #0d2137; color: #4fc3f7; }
        .badge.park { background: #1b2e1b; color: #66bb6a; }
        .badge.general { background: #2a2a1b; color: #ffb74d; }

        /* 园区设置表格 */
        .toolbar { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
        .toolbar button, .toolbar .btn {
            padding: 6px 14px; border-radius: 6px; border: none; cursor: pointer;
            font-size: 12px; transition: 0.15s;
        }
        .btn-primary { background: #1565c0; color: #fff; }
        .btn-primary:hover { background: #1976d2; }
        .btn-danger { background: #c62828; color: #fff; }
        .btn-danger:hover { background: #d32f2f; }
        .btn-sm { padding: 3px 10px; font-size: 11px; }
        table { width: 100%; border-collapse: collapse; font-size: 13px; }
        th { text-align: left; padding: 8px 6px; color: #5a6a7a; border-bottom: 1px solid #1a2a3e; font-weight: 500; font-size: 12px; }
        td { padding: 8px 6px; border-bottom: 1px solid #15202e; }
        tr:hover td { background: #15202e; }
        .mono { font-family: monospace; color: #4fc3f7; font-size: 12px; }
        .coords { font-family: monospace; color: #ce93d8; font-size: 12px; }
        /* Toggle 开关 */
        .toggle { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
        .toggle input { opacity: 0; width: 0; height: 0; }
        .toggle .slider {
            position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
            background: #2a3a4e; border-radius: 20px; transition: 0.3s;
        }
        .toggle .slider:before {
            content: ''; position: absolute; height: 14px; width: 14px; left: 3px; bottom: 3px;
            background: #5a6a7a; border-radius: 50%; transition: 0.3s;
        }
        .toggle input:checked + .slider { background: #2e7d32; }
        .toggle input:checked + .slider:before { transform: translateX(16px); background: #fff; }
        .toggle-wrap { display: flex; align-items: center; gap: 8px; height: 32px; }

        /* 园区编辑弹窗（内嵌） */
        .park-form {
            display: none; background: #0f1923; border: 1px solid #1a2a3e; border-radius: 8px;
            padding: 16px; margin-bottom: 12px;
        }
        .park-form.visible { display: block; }
        .park-form .row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; align-items: center; }
        .park-form label { font-size: 12px; color: #5a6a7a; min-width: 50px; }
        .park-form input {
            padding: 6px 10px; border: 1px solid #1a2a3e; border-radius: 4px;
            background: #0a0e17; color: #e0e0e0; font-size: 13px; flex: 1; min-width: 120px;
        }
        .park-form .coords-row { display: flex; gap: 8px; align-items: center; }
        .park-form .coords-row input { flex: 0 0 130px; }
        .park-form .geo-status { font-size: 11px; color: #ffb74d; margin-left: 8px; }

        /* 可编辑单元格样式 */
        .editable-cell {
            cursor: pointer;
            transition: background 0.1s;
        }
        .editable-cell:hover {
            background: #1a2a3e;
            outline: 1px dashed #4fc3f7;
        }

        /* Toast */
        .toast {
            position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: 6px;
            color: #fff; font-size: 14px; z-index: 9999; display: none;
        }
        .toast.success { background: #2e7d32; }
        .toast.error { background: #c62828; }
    

      #mapModal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.7);z-index:9999;}
      #mapModal .box{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:820px;height:640px;background:#101a2e;border-radius:10px;overflow:hidden;}
      #mapEditorDiv{width:100%;height:560px;}
      #mapModal .bar{padding:8px 12px;display:flex;align-items:center;gap:10px;color:#fff;font-size:13px;}
      #mapModal .bar button{padding:6px 16px;border:none;border-radius:4px;cursor:pointer;}
      #satZoomModal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.9);z-index:10000;text-align:center;padding:20px;}
      #satZoomImg{max-width:90%;max-height:90%;border-radius:8px;}
    

      .rc-tab{padding:6px 16px;border:1px solid #1a2a3e;border-radius:6px;background:#0f1923;color:#7a8a9a;cursor:pointer;font-size:13px;transition:.15s;}
      .rc-tab.active{background:#0d2137;border-color:#4fc3f7;color:#4fc3f7;}
      .rc-field{display:flex;flex-direction:column;gap:4px;margin-bottom:10px;}
      .rc-field label{font-size:12px;color:#7a8a9a;}
      .rc-field input,.rc-field select{padding:6px 10px;background:#0a0e17;border:1px solid #1a2a3e;border-radius:4px;color:#e0e0e0;font-size:13px;}
      .rc-field .hint{font-size:11px;color:#5a6a7a;}
      .rc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px 14px;}
    


/* ===== 配置页统一提示（2026.11.14.9）=====
   所有页签说明文字共用这一种样式：11px、左侧竖线、深底。
   以前各页签自己写行内样式，字号颜色都不一致，读起来很杂。 */
.cfg-hint {
    font-size: 11px;
    line-height: 1.7;
    color: #6a7c8c;
    padding: 7px 10px;
    background: #0b1620;
    border-left: 2px solid #1e3348;
    border-radius: 3px;
    margin-bottom: 10px;
}
.cfg-hint b { color: #93a8b8; font-weight: normal; }

/* 节点视角下"平台级页签"的提示条 */
.scope-dim-tip {
    display: none;
    font-size: 11px;
    line-height: 1.7;
    color: #a08a54;
    padding: 7px 10px;
    background: #16130a;
    border-left: 2px solid #6b5200;
    border-radius: 3px;
    margin-bottom: 10px;
}


/* 平台级页签在节点视角下整体置灰（由 applyScopeLock 统一加/撤这个类） */
.scope-locked { opacity: 0.62; }

/* ===== 服务节点拓扑（节点图编辑器）：Palette + 点阵画布 + 端口连线 ===== */
.topo-bar { display:flex; align-items:center; gap:14px; margin-bottom:10px; flex-wrap:wrap; }
.topo-lg { font-size:12px; color:#8a9aab; display:inline-flex; align-items:center; gap:5px; }
.topo-lg i { width:9px; height:9px; border-radius:50%; display:inline-block; }
.topo-sel { padding:5px 8px; background:#0d1620; color:#e0e0e0; border:1px solid #2a3a4e; border-radius:6px; font-size:12px; }

.topo-shell { display:flex; gap:12px; align-items:stretch; }
.topo-palette { width:236px; flex-shrink:0; display:flex; flex-direction:column; background:#111d2c; border:1px solid #1a2a3e; border-radius:12px; padding:10px; }
.tp-title { display:flex; align-items:center; justify-content:space-between; font-size:13px; font-weight:600; color:#c8d6e5; border-left:3px solid #4fc3f7; padding-left:8px; margin-bottom:8px; flex-shrink:0; }
.tp-mini { font-size:11px; padding:3px 8px; background:#152232; color:#64b5f6; border:1px solid #2a5a8c; border-radius:6px; cursor:pointer; }
.tp-search { width:100%; padding:6px 9px; background:#0d1620; color:#e0e0e0; border:1px solid #2a3a4e; border-radius:6px; font-size:12px; margin-bottom:8px; flex-shrink:0; box-sizing:border-box; }
.tp-chips { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:8px; flex-shrink:0; }
.tp-chip { font-size:11px; padding:3px 8px; background:#0d1620; color:#8a9aab; border:1px solid #1f3040; border-radius:12px; cursor:pointer; }
.tp-chip.active { background:#1a3a5c; color:#64b5f6; border-color:#2a5a8c; }
.tp-chip em { font-style:normal; opacity:.7; }
.tp-list { overflow-y:auto; flex:1; }
.tp-group { border-left:3px solid #2a3a4e; padding-left:8px; margin-bottom:10px; }
.tp-gtitle { font-size:11px; color:#8a9aab; margin-bottom:4px; }
.tp-item { padding:6px 8px; border-radius:7px; cursor:pointer; background:#0d1620; border:1px solid #172533; margin-bottom:4px; }
.tp-item:hover { border-color:#2a5a8c; }
.tp-item.sel { border-color:#4fc3f7; background:#12293c; }
.tp-item-name { font-size:12px; color:#d8e4f0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tp-item-sub { font-size:10px; color:#7a8a9a; margin-top:2px; }
.tp-empty { font-size:12px; color:#5a6a7a; padding:8px 2px; }

.topo-stage { flex:1; position:relative; min-width:0; }
.topo-canvas { height:820px; overflow:hidden; position:relative; border:1px solid #1a2a3e; border-radius:12px;
  background-color:#0a1219; background-image:radial-gradient(#1e3247 1px, transparent 1px); background-size:22px 22px;
  cursor:grab; }
.topo-canvas.dragging { cursor:grabbing; }
.topo-layer { position:relative; transform-origin:0 0; }
.topo-svg { position:absolute; left:0; top:0; pointer-events:none; }

.tnode { position:absolute; display:flex; align-items:center; gap:8px; padding:0 12px; border:1.5px solid #3a5a78;
  border-radius:10px; cursor:move; user-select:none; box-sizing:border-box; box-shadow:0 2px 10px rgba(0,0,0,.35); }
.tnode:hover { box-shadow:0 0 0 1px rgba(79,195,247,.5), 0 4px 14px rgba(0,0,0,.45); }
.tnode.sel { box-shadow:0 0 0 2px #4fc3f7, 0 4px 16px rgba(0,0,0,.55); }
.tnode.off { opacity:.55; }
.tnode.warn { border-style:dashed; }
.tnode-icon { font-size:19px; flex-shrink:0; }
.tnode-main { min-width:0; flex:1; }
.tnode-title { font-size:12.5px; font-weight:600; color:#f0f6ff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.35; }
.tnode-sub { font-size:10px; color:rgba(230,240,255,.62); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.3; }
.tnode-state { position:absolute; right:6px; top:6px; width:7px; height:7px; border-radius:50%; }
.s-on { background:#2ecc71; } .s-warn { background:#f39c12; } .s-off { background:#e74c3c; }
.tnode-port { position:absolute; width:9px; height:9px; border-radius:50%; background:#e9f2ff; border:1px solid rgba(79,195,247,.55); box-shadow:0 0 6px rgba(120,190,255,.55); }
.tnode-port.p-top { left:50%; top:-5px; transform:translateX(-50%); }
.tnode-port.p-bottom { left:50%; bottom:-5px; transform:translateX(-50%); }

.topo-zoom { position:absolute; right:14px; bottom:14px; display:flex; align-items:center; gap:6px; padding:5px 8px;
  background:rgba(13,22,32,.92); border:1px solid #1f3040; border-radius:9px; }
.topo-zoom button { padding:3px 9px; background:#152232; color:#9fb6cc; border:1px solid #2a3a4e; border-radius:6px; cursor:pointer; font-size:12px; }
.topo-zoom button:hover { color:#64b5f6; border-color:#2a5a8c; }
.topo-zoom span { font-size:11px; color:#8a9aab; min-width:38px; text-align:center; }

/* 属性面板：默认收起（不占位），点节点才展开；刷新周期到点自动收回 */
.topo-props { width:272px; flex-shrink:0; background:#111d2c; border:1px solid #1a2a3e; border-radius:12px; padding:10px; overflow-y:auto; display:none; }
.topo-props.show { display:block; animation:tpFadeIn .18s ease-out; }
@keyframes tpFadeIn { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:none; } }
.tp-node-head { font-size:13px; font-weight:600; color:#e6f0fa; border-left:3px solid #4fc3f7; padding-left:8px; margin:2px 0 10px; }
.tp-kv { display:flex; justify-content:space-between; gap:8px; font-size:11.5px; padding:3px 0; border-bottom:1px dashed #16232f; }
.tp-kv span { color:#7a8a9a; flex-shrink:0; }
.tp-kv b { color:#d8e4f0; font-weight:500; text-align:right; word-break:break-all; }
.tp-line { font-size:11.5px; color:#d8e4f0; padding:3px 0; border-bottom:1px dashed #16232f; text-align:left; word-break:break-all; }
.tp-sec { font-size:11px; color:#64b5f6; margin:10px 0 4px; padding-left:8px; border-left:2px solid #2a5a8c; }
.tp-bar-row { display:flex; justify-content:space-between; font-size:10.5px; color:#7a8a9a; }
.tp-bar { height:5px; border-radius:3px; background:#16232f; overflow:hidden; margin:1px 0 5px; }
.tp-bar b { display:block; height:100%; }
.tp-btn { display:block; width:100%; margin-top:5px; padding:5px; font-size:11px; background:#152232; color:#9fc6ef; border:1px solid #2a5a8c; border-radius:6px; cursor:pointer; }
.tp-btn:hover { background:#1a3a5c; color:#fff; }
.tp-btn.danger { background:#251518; color:#ef7b7b; border-color:#8c2a2a; }
.tp-btn.danger:hover { background:#3a1a1a; color:#fff; }
.tp-actions { margin-top:12px; border-top:1px solid #1a2a3e; padding-top:8px; }
.tp-link-row { font-size:11px; color:#a8bcd0; padding:2px 0; }
