wecom.center.css 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. /* ==================================================================
  2. WeCom Center — clean card UI
  3. ================================================================== */
  4. .wc-wrap { padding: 4px 2px 32px; }
  5. .wc-hero {
  6. margin: 6px 0 18px;
  7. padding: 18px 22px;
  8. border-radius: 12px;
  9. background: linear-gradient(135deg, #2f6fdd 0%, #274b8f 100%);
  10. color: #fff;
  11. box-shadow: 0 6px 18px rgba(47,111,221,.25);
  12. }
  13. .wc-hero__title { font-size: 20px; font-weight: 700; letter-spacing: .3px; }
  14. .wc-hero__sub { margin-top: 6px; font-size: 13px; opacity: .9; line-height: 1.5; }
  15. .wc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
  16. .wc-grid > * { min-width: 0; }
  17. .wc-card {
  18. background: #fff;
  19. border: 1px solid #e3e6ea;
  20. border-radius: 12px;
  21. box-shadow: 0 1px 3px rgba(20,30,50,.06);
  22. overflow: hidden;
  23. margin-bottom: 16px;
  24. min-width: 0;
  25. }
  26. .wc-card--wide { grid-column: 1 / -1; }
  27. .wc-card__head {
  28. display: flex; align-items: center; gap: 10px;
  29. padding: 13px 18px;
  30. border-bottom: 1px solid #eef0f3;
  31. background: #fafbfd;
  32. }
  33. .wc-card__ico { font-size: 17px; line-height: 1; }
  34. .wc-card__title { font-size: 14.5px; font-weight: 650; color: #23272e; }
  35. .wc-card__sub { font-size: 12px; color: #808793; margin-left: auto; }
  36. .wc-card__body { padding: 16px 18px; }
  37. .wc-hint { color: #7a828c; font-size: 12px; line-height: 1.6; margin: 0 0 12px; }
  38. /* fields */
  39. .wc-field { margin-bottom: 14px; }
  40. .wc-field:last-child { margin-bottom: 0; }
  41. .wc-field label { display: block; font-size: 12px; font-weight: 600; color: #55606d; margin-bottom: 5px; }
  42. .wc-input {
  43. width: 100%; box-sizing: border-box; padding: 8px 11px;
  44. border: 1px solid #cfd6dd; border-radius: 7px; font-size: 13px; color: #23272e; background: #fff;
  45. }
  46. .wc-input:focus { outline: none; border-color: #2f6fdd; box-shadow: 0 0 0 3px rgba(47,111,221,.15); }
  47. .wc-input--mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
  48. select.wc-input {
  49. appearance: auto;
  50. height: 36px;
  51. line-height: 1.4;
  52. padding: 6px 10px;
  53. font-family: inherit;
  54. font-size: 13px;
  55. vertical-align: middle;
  56. }
  57. select.wc-input option { color: #1f2c33; }
  58. /* buttons */
  59. .wc-btn {
  60. display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  61. padding: 7px 15px; border-radius: 7px; font-size: 13px; font-weight: 600;
  62. border: 1px solid transparent; text-decoration: none !important; line-height: 1.2;
  63. }
  64. .wc-btn--primary { background: #2f6fdd; color: #fff; }
  65. .wc-btn--primary:hover { background: #275fc0; color: #fff; }
  66. .wc-btn--ghost { background: #fff; color: #2f6fdd; border-color: #cfd6dd; }
  67. .wc-btn--ghost:hover { background: #f2f6ff; }
  68. .wc-btn--danger { background: #d9534f; color: #fff; }
  69. .wc-btn--sm { padding: 5px 11px; font-size: 12px; }
  70. .wc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
  71. /* pills & badges */
  72. .wc-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
  73. .wc-pill--cur { background: #e6f4ea; color: #2f9e5e; }
  74. .wc-pill--muted { background: #eef1f5; color: #667080; }
  75. .wc-sev { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600; color: #fff; }
  76. .wc-sev-1 { background: #9aa3ad; } .wc-sev-2 { background: #4a90d9; }
  77. .wc-sev-3 { background: #e0a800; } .wc-sev-4 { background: #e07b00; }
  78. .wc-sev-5 { background: #d9534f; } .wc-sev-6 { background: #a4133c; }
  79. /* preset rows */
  80. .wc-preset { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f0f2f5; }
  81. .wc-preset:last-child { border-bottom: none; }
  82. .wc-preset__main { flex: 1; min-width: 0; }
  83. .wc-preset__name { font-size: 13.5px; font-weight: 650; color: #23272e; display: flex; align-items: center; gap: 8px; }
  84. .wc-preset__desc { font-size: 12px; color: #808793; margin-top: 3px; line-height: 1.45; }
  85. .wc-preset__act { display: flex; gap: 8px; flex-shrink: 0; }
  86. /* tables */
  87. .wc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  88. .wc-table th { text-align: left; padding: 9px 10px; background: #f7f9fc; color: #667080; font-weight: 600; border-bottom: 1px solid #e6eaef; white-space: nowrap; }
  89. .wc-table td { padding: 9px 10px; border-bottom: 1px solid #eef1f4; color: #2b2f36; vertical-align: middle; }
  90. .wc-table tr:last-child td { border-bottom: none; }
  91. .wc-table .num { text-align: right; font-variant-numeric: tabular-nums; }
  92. .wc-table tr.wc-tr-total td { background: #fafbfd; font-weight: 700; }
  93. /* code block */
  94. .wc-code { background: #0f172a; color: #e2e8f0; padding: 13px 15px; border-radius: 9px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.6; overflow: auto; white-space: pre; margin: 8px 0 14px; }
  95. .wc-code__label { font-size: 12px; font-weight: 600; color: #55606d; margin: 2px 0 2px; }
  96. /* checkbox list */
  97. .wc-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
  98. .wc-checks label { display inline; font-weight: 500; color: #2b2f36; font-size: 12.5px; }
  99. .wc-checkrow { display: flex; align-items: center; gap: 8px; }
  100. /* host chips (preview) */
  101. .wc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  102. .wc-chip { background: #eef4ff; color: #274b8f; border-radius: 6px; padding: 3px 9px; font-size: 11.5px; }
  103. /* misc */
  104. .wc-muted { color: #808793; font-size: 12px; }
  105. .wc-divider { height: 1px; background: #eef1f4; margin: 16px 0; }
  106. .wc-empty { color: #808793; font-size: 13px; padding: 10px 0; }
  107. .wc-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
  108. .wc-inline .wc-field { flex: 1; min-width: 160px; margin-bottom: 0; }
  109. /* tab bar */
  110. .wc-tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 2px solid #e6eaef; }
  111. .wc-tab {
  112. display: inline-block; padding: 10px 22px; font-size: 14px; font-weight: 600;
  113. color: #667080; text-decoration: none !important; border-bottom: 2px solid transparent;
  114. margin-bottom: -2px; border-radius: 8px 8px 0 0;
  115. }
  116. .wc-tab:hover { color: #2f6fdd; background: #f2f6ff; }
  117. .wc-tab.is-active { color: #2f6fdd; border-bottom-color: #2f6fdd; background: #eef4ff; }
  118. /* ==================================================================
  119. Dark theme (Zabbix sets theme/color-scheme on <html>)
  120. ================================================================== */
  121. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-card {
  122. background: #1b2230; border-color: #2b3441; box-shadow: 0 1px 3px rgba(0,0,0,.45);
  123. }
  124. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-card__head {
  125. background: #212a38; border-bottom-color: #2b3441;
  126. }
  127. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-card__title { color: #e7ebf1; }
  128. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-card__sub { color: #8b95a3; }
  129. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-hint { color: #94a0b0; }
  130. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-field label { color: #aab4c2; }
  131. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-input {
  132. background: #121924; color: #e7ebf1; border-color: #36414f;
  133. }
  134. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-input:focus {
  135. border-color: #4f8bf0; box-shadow: 0 0 0 3px rgba(79,139,240,.25);
  136. }
  137. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-btn--ghost {
  138. background: #212a38; color: #7fb0ff; border-color: #36414f;
  139. }
  140. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-btn--ghost:hover { background: #263140; }
  141. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-pill--muted { background: #263140; color: #aab4c2; }
  142. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-preset { border-bottom-color: #28313d; }
  143. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-preset__name { color: #e7ebf1; }
  144. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-preset__desc { color: #8b95a3; }
  145. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-table th {
  146. background: #212a38; color: #aab4c2; border-bottom-color: #2b3441;
  147. }
  148. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-table td {
  149. color: #d5dbe3; border-bottom-color: #28313d;
  150. }
  151. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-table tr.wc-tr-total td { background: #212a38; }
  152. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-code__label { color: #aab4c2; }
  153. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-chip { background: #20304a; color: #9cc0ff; }
  154. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-divider { background: #28313d; }
  155. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-muted,
  156. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-empty { color: #8b95a3; }
  157. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-checks label { color: #d5dbe3; }
  158. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-tabs { border-bottom-color: #2b3441; }
  159. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-tab { color: #9aa6b5; }
  160. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-tab:hover { background: #212a38; color: #7fb0ff; }
  161. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-tab.is-active {
  162. color: #7fb0ff; border-bottom-color: #4f8bf0; background: #1f2b3d;
  163. }
  164. /* per-trigger severity rows (flex, min-width:0 => never widens the card) */
  165. .wc-trow {
  166. display: flex; align-items: center; gap: 12px; min-width: 0;
  167. padding: 7px 2px; border-bottom: 1px solid #f2f4f7;
  168. }
  169. .wc-trow .wc-tcheck {
  170. display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
  171. margin: 0; font-size: 13px; font-weight: 400; color: inherit;
  172. }
  173. .wc-trow .wc-tmain {
  174. flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  175. }
  176. .wc-trow select.wc-input { width: 150px; max-width: 150px; flex: 0 0 150px; }
  177. :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-trow { border-bottom-color: #28313d; }