style.css 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /* =====================================================================
  2. L2 Physical Topology page styles (light + dark, no external deps)
  3. ===================================================================== */
  4. .l2-wrap {
  5. --bg: #f4f6f9;
  6. --panel: #ffffff;
  7. --panel-2: #fafbfd;
  8. --border: #e2e7ee;
  9. --text: #23272e;
  10. --muted: #7b8694;
  11. --brand: #2f6fdd;
  12. position: relative;
  13. padding: 8px 2px 18px;
  14. color: var(--text);
  15. }
  16. .l2-wrap.l2-dark {
  17. --bg: #0f1521;
  18. --panel: #161f2e;
  19. --panel-2: #1b2536;
  20. --border: #263143;
  21. --text: #dbe4f0;
  22. --muted: #8296ad;
  23. --brand: #4f8bf0;
  24. }
  25. /* toolbar */
  26. .l2-toolbar {
  27. display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  28. padding: 10px 14px; margin-bottom: 10px;
  29. background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  30. box-shadow: 0 1px 3px rgba(20,30,50,.05);
  31. }
  32. .tb-title { font-size: 16px; font-weight: 750; letter-spacing: .3px; margin-right: 6px; }
  33. .l2-muted { color: var(--muted); font-size: 12px; }
  34. .l2-spacer { flex: 1 1 auto; }
  35. .l2-search-wrap { position: relative; }
  36. #l2-search {
  37. width: 240px; height: 34px; padding: 0 12px; border-radius: 8px;
  38. border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: 13px;
  39. }
  40. #l2-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,139,240,.15); }
  41. #l2-sug {
  42. display: none; position: absolute; z-index: 50; top: 38px; left: 0; width: 340px; max-height: 340px;
  43. overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  44. box-shadow: 0 10px 30px rgba(10,20,40,.18);
  45. }
  46. .sug-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 12.5px; }
  47. .sug-row:hover { background: var(--panel-2); }
  48. .sug-kind { flex: 0 0 auto; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; color: #fff; }
  49. .sug-kind.sw { background: #2E75B6; }
  50. .sug-kind.term { background: #2ECC71; }
  51. .sug-lbl { color: var(--text); }
  52. .sug-sub { color: var(--muted); margin-left: auto; font-size: 11.5px; }
  53. .sug-empty { padding: 10px 12px; color: var(--muted); }
  54. .l2-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text); cursor: pointer; user-select: none; }
  55. .l2-ts-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); }
  56. .l2-btn {
  57. height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer; font-size: 12.5px;
  58. border: 1px solid var(--border); background: var(--panel-2); color: var(--text); line-height: 30px;
  59. }
  60. .l2-btn:hover { border-color: var(--brand); color: var(--brand); }
  61. .l2-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
  62. .l2-btn.primary:hover { filter: brightness(1.08); color: #fff; }
  63. .l2-btn.on { background: #E97659; border-color: #E97659; color: #fff; }
  64. /* main split */
  65. .l2-main { display: flex; gap: 12px; align-items: stretch; min-height: 70vh; }
  66. .l2-canvas {
  67. position: relative; flex: 1 1 auto; min-width: 0; height: 74vh;
  68. background:
  69. linear-gradient(rgba(120,140,170,.06) 1px, transparent 1px) 0 0 / 26px 26px,
  70. linear-gradient(90deg, rgba(120,140,170,.06) 1px, transparent 1px) 0 0 / 26px 26px,
  71. var(--bg);
  72. border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  73. }
  74. .l2-dark .l2-canvas { background:
  75. linear-gradient(rgba(120,150,200,.05) 1px, transparent 1px) 0 0 / 26px 26px,
  76. linear-gradient(90deg, rgba(120,150,200,.05) 1px, transparent 1px) 0 0 / 26px 26px,
  77. var(--bg); }
  78. #l2-cy { position: absolute; inset: 0; }
  79. .l2-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
  80. .l2-stats {
  81. position: absolute; left: 12px; top: 12px; z-index: 20;
  82. padding: 6px 12px; font-size: 12px; border-radius: 8px;
  83. background: color-mix(in srgb, var(--panel) 88%, transparent);
  84. border: 1px solid var(--border); color: var(--text); backdrop-filter: blur(4px);
  85. }
  86. .l2-net-tabs {
  87. position: absolute; right: 12px; top: 12px; z-index: 21; display: flex; gap: 8px;
  88. }
  89. .l2-net-tab {
  90. border: 1px solid var(--border); background: color-mix(in srgb, var(--panel) 90%, transparent);
  91. color: var(--muted); font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 8px;
  92. cursor: pointer; backdrop-filter: blur(4px);
  93. }
  94. .l2-net-tab:hover { color: var(--text); border-color: var(--brand); }
  95. .l2-net-tab.active { color: #fff; background: var(--brand); border-color: var(--brand); }
  96. .l2-legend {
  97. position: absolute; left: 12px; bottom: 12px; z-index: 20;
  98. padding: 10px 12px; font-size: 12px; border-radius: 10px; max-width: 240px;
  99. background: color-mix(in srgb, var(--panel) 90%, transparent);
  100. border: 1px solid var(--border); color: var(--text); backdrop-filter: blur(4px);
  101. }
  102. .lg-title { font-weight: 700; color: var(--muted); font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; margin: 8px 0 4px; }
  103. .lg-title:first-child { margin-top: 0; }
  104. .lg-row { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
  105. .lg-line { width: 22px; height: 0; border-top: 3px solid #999; display: inline-block; }
  106. .lg-line.lg-dash { border-top-style: dashed; border-top-color: #E45959; }
  107. .lg-box { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
  108. /* side panel */
  109. .l2-side { flex: 0 0 320px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
  110. .side-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--panel-2); }
  111. .side-tab { flex: 1; text-align: center; padding: 11px 8px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; }
  112. .side-tab.active { color: var(--brand); border-bottom-color: var(--brand); background: var(--panel); }
  113. .badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; color: #fff; background: #E45959; line-height: 18px; }
  114. .side-body { flex: 1; overflow: auto; }
  115. .panel-sec { display: none; }
  116. .panel-sec.active { display: block; }
  117. .panel-empty { padding: 22px 14px; color: var(--muted); text-align: center; font-size: 13px; }
  118. .alarm-row, .off-row { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
  119. .alarm-row:hover, .off-row:hover { background: var(--panel-2); }
  120. .alarm-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; }
  121. .alarm-main, .off-main { min-width: 0; }
  122. .alarm-title { font-size: 12.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
  123. .alarm-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
  124. .off-mac { font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--text); }
  125. .off-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
  126. /* tooltip */
  127. .l2-tip {
  128. display: none; position: fixed; z-index: 9999; max-width: 340px;
  129. padding: 10px 12px; font-size: 12.5px; line-height: 1.55; border-radius: 10px;
  130. background: rgba(18,26,40,.96); color: #eef4ff; box-shadow: 0 10px 28px rgba(0,0,0,.35);
  131. pointer-events: none;
  132. }
  133. .l2-tip hr { border: none; border-top: 1px solid rgba(255,255,255,.15); margin: 6px 0; }
  134. @media (max-width: 900px) {
  135. .l2-main { flex-direction: column; }
  136. .l2-side { flex-basis: auto; height: 300px; }
  137. .l2-canvas { height: 60vh; }
  138. }