style.css 7.9 KB

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