| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- /* ==================================================================
- WeCom Center — clean card UI
- ================================================================== */
- .wc-wrap { padding: 4px 2px 32px; }
- .wc-hero {
- margin: 6px 0 18px;
- padding: 18px 22px;
- border-radius: 12px;
- background: linear-gradient(135deg, #2f6fdd 0%, #274b8f 100%);
- color: #fff;
- box-shadow: 0 6px 18px rgba(47,111,221,.25);
- }
- .wc-hero__title { font-size: 20px; font-weight: 700; letter-spacing: .3px; }
- .wc-hero__sub { margin-top: 6px; font-size: 13px; opacity: .9; line-height: 1.5; }
- .wc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
- .wc-grid > * { min-width: 0; }
- .wc-card {
- background: #fff;
- border: 1px solid #e3e6ea;
- border-radius: 12px;
- box-shadow: 0 1px 3px rgba(20,30,50,.06);
- overflow: hidden;
- margin-bottom: 16px;
- min-width: 0;
- }
- .wc-card--wide { grid-column: 1 / -1; }
- .wc-card__head {
- display: flex; align-items: center; gap: 10px;
- padding: 13px 18px;
- border-bottom: 1px solid #eef0f3;
- background: #fafbfd;
- }
- .wc-card__ico { font-size: 17px; line-height: 1; }
- .wc-card__title { font-size: 14.5px; font-weight: 650; color: #23272e; }
- .wc-card__sub { font-size: 12px; color: #808793; margin-left: auto; }
- .wc-card__body { padding: 16px 18px; }
- .wc-hint { color: #7a828c; font-size: 12px; line-height: 1.6; margin: 0 0 12px; }
- /* fields */
- .wc-field { margin-bottom: 14px; }
- .wc-field:last-child { margin-bottom: 0; }
- .wc-field label { display: block; font-size: 12px; font-weight: 600; color: #55606d; margin-bottom: 5px; }
- .wc-input {
- width: 100%; box-sizing: border-box; padding: 8px 11px;
- border: 1px solid #cfd6dd; border-radius: 7px; font-size: 13px; color: #23272e; background: #fff;
- }
- .wc-input:focus { outline: none; border-color: #2f6fdd; box-shadow: 0 0 0 3px rgba(47,111,221,.15); }
- .wc-input--mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
- select.wc-input {
- appearance: auto;
- height: 36px;
- line-height: 1.4;
- padding: 6px 10px;
- font-family: inherit;
- font-size: 13px;
- vertical-align: middle;
- }
- select.wc-input option { color: #1f2c33; }
- /* buttons */
- .wc-btn {
- display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
- padding: 7px 15px; border-radius: 7px; font-size: 13px; font-weight: 600;
- border: 1px solid transparent; text-decoration: none !important; line-height: 1.2;
- }
- .wc-btn--primary { background: #2f6fdd; color: #fff; }
- .wc-btn--primary:hover { background: #275fc0; color: #fff; }
- .wc-btn--ghost { background: #fff; color: #2f6fdd; border-color: #cfd6dd; }
- .wc-btn--ghost:hover { background: #f2f6ff; }
- .wc-btn--danger { background: #d9534f; color: #fff; }
- .wc-btn--sm { padding: 5px 11px; font-size: 12px; }
- .wc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
- /* pills & badges */
- .wc-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
- .wc-pill--cur { background: #e6f4ea; color: #2f9e5e; }
- .wc-pill--muted { background: #eef1f5; color: #667080; }
- .wc-sev { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600; color: #fff; }
- .wc-sev-1 { background: #9aa3ad; } .wc-sev-2 { background: #4a90d9; }
- .wc-sev-3 { background: #e0a800; } .wc-sev-4 { background: #e07b00; }
- .wc-sev-5 { background: #d9534f; } .wc-sev-6 { background: #a4133c; }
- /* preset rows */
- .wc-preset { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f0f2f5; }
- .wc-preset:last-child { border-bottom: none; }
- .wc-preset__main { flex: 1; min-width: 0; }
- .wc-preset__name { font-size: 13.5px; font-weight: 650; color: #23272e; display: flex; align-items: center; gap: 8px; }
- .wc-preset__desc { font-size: 12px; color: #808793; margin-top: 3px; line-height: 1.45; }
- .wc-preset__act { display: flex; gap: 8px; flex-shrink: 0; }
- /* tables */
- .wc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
- .wc-table th { text-align: left; padding: 9px 10px; background: #f7f9fc; color: #667080; font-weight: 600; border-bottom: 1px solid #e6eaef; white-space: nowrap; }
- .wc-table td { padding: 9px 10px; border-bottom: 1px solid #eef1f4; color: #2b2f36; vertical-align: middle; }
- .wc-table tr:last-child td { border-bottom: none; }
- .wc-table .num { text-align: right; font-variant-numeric: tabular-nums; }
- .wc-table tr.wc-tr-total td { background: #fafbfd; font-weight: 700; }
- /* code block */
- .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; }
- .wc-code__label { font-size: 12px; font-weight: 600; color: #55606d; margin: 2px 0 2px; }
- /* checkbox list */
- .wc-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
- .wc-checks label { display inline; font-weight: 500; color: #2b2f36; font-size: 12.5px; }
- .wc-checkrow { display: flex; align-items: center; gap: 8px; }
- /* host chips (preview) */
- .wc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
- .wc-chip { background: #eef4ff; color: #274b8f; border-radius: 6px; padding: 3px 9px; font-size: 11.5px; }
- /* misc */
- .wc-muted { color: #808793; font-size: 12px; }
- .wc-divider { height: 1px; background: #eef1f4; margin: 16px 0; }
- .wc-empty { color: #808793; font-size: 13px; padding: 10px 0; }
- .wc-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
- .wc-inline .wc-field { flex: 1; min-width: 160px; margin-bottom: 0; }
- /* tab bar */
- .wc-tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 2px solid #e6eaef; }
- .wc-tab {
- display: inline-block; padding: 10px 22px; font-size: 14px; font-weight: 600;
- color: #667080; text-decoration: none !important; border-bottom: 2px solid transparent;
- margin-bottom: -2px; border-radius: 8px 8px 0 0;
- }
- .wc-tab:hover { color: #2f6fdd; background: #f2f6ff; }
- .wc-tab.is-active { color: #2f6fdd; border-bottom-color: #2f6fdd; background: #eef4ff; }
- /* ==================================================================
- Dark theme (Zabbix sets theme/color-scheme on <html>)
- ================================================================== */
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-card {
- background: #1b2230; border-color: #2b3441; box-shadow: 0 1px 3px rgba(0,0,0,.45);
- }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-card__head {
- background: #212a38; border-bottom-color: #2b3441;
- }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-card__title { color: #e7ebf1; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-card__sub { color: #8b95a3; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-hint { color: #94a0b0; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-field label { color: #aab4c2; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-input {
- background: #121924; color: #e7ebf1; border-color: #36414f;
- }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-input:focus {
- border-color: #4f8bf0; box-shadow: 0 0 0 3px rgba(79,139,240,.25);
- }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-btn--ghost {
- background: #212a38; color: #7fb0ff; border-color: #36414f;
- }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-btn--ghost:hover { background: #263140; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-pill--muted { background: #263140; color: #aab4c2; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-preset { border-bottom-color: #28313d; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-preset__name { color: #e7ebf1; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-preset__desc { color: #8b95a3; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-table th {
- background: #212a38; color: #aab4c2; border-bottom-color: #2b3441;
- }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-table td {
- color: #d5dbe3; border-bottom-color: #28313d;
- }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-table tr.wc-tr-total td { background: #212a38; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-code__label { color: #aab4c2; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-chip { background: #20304a; color: #9cc0ff; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-divider { background: #28313d; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-muted,
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-empty { color: #8b95a3; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-checks label { color: #d5dbe3; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-tabs { border-bottom-color: #2b3441; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-tab { color: #9aa6b5; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-tab:hover { background: #212a38; color: #7fb0ff; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-tab.is-active {
- color: #7fb0ff; border-bottom-color: #4f8bf0; background: #1f2b3d;
- }
- /* per-trigger severity rows (flex, min-width:0 => never widens the card) */
- .wc-trow {
- display: flex; align-items: center; gap: 12px; min-width: 0;
- padding: 7px 2px; border-bottom: 1px solid #f2f4f7;
- }
- .wc-trow .wc-tcheck {
- display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
- margin: 0; font-size: 13px; font-weight: 400; color: inherit;
- }
- .wc-trow .wc-tmain {
- flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
- }
- .wc-trow select.wc-input { width: 150px; max-width: 150px; flex: 0 0 150px; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-trow { border-bottom-color: #28313d; }
- /* ---- L2 config tab: multi-select, colour pickers, grouping rules ---- */
- .wc-input--multi { height: auto; min-height: 120px; padding: 6px; }
- .wc-input--multi option { padding: 3px 6px; }
- .wc-input--color { height: 34px; padding: 2px; cursor: pointer; }
- .wc-rules { display: flex; flex-direction: column; gap: 8px; }
- .wc-rule {
- display: flex; align-items: center; gap: 8px; min-width: 0;
- padding: 8px; border: 1px solid #e3e6ea; border-radius: 8px; background: #fafbfd;
- }
- .wc-rule .wc-input { min-width: 0; }
- .wc-rule-label { flex: 0 0 82px; font-size: 12.5px; font-weight: 600; color: #34495e; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-rule-label { color: #cfe0f5; }
- .wc-rule input[name="rule_pattern[]"],
- .wc-rule input[name="rule_label[]"],
- .wc-rule input[name="core_pattern[]"] { flex: 1 1 0; }
- .wc-rule-del { flex: 0 0 auto; padding: 4px 10px; line-height: 1; }
- :is(html[color-scheme="dark"], html[theme="dark-theme"]) .wc-rule { background: #1b2432; border-color: #2b3644; }
|