:root {
  color-scheme: light;
  --bg: #f6f7f9; --card: #ffffff; --text: #1f2328; --muted: #57606a;
  --op: #2da44e; --perf: #ffc107; --partial: #d4870c; --major: #cf222e; --border: #d0d7de;
  --header-bg: #eceff3; --flash-bg: #fff3cd; --flash-text: #664d03; --flash-border: #ffecb5;
  --text-on-light: #000000; --text-on-dark: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1117; --card: #161b22; --text: #e6edf3; --muted: #8b949e; --border: #30363d;
    --header-bg: #1f252d; --flash-bg: #332701; --flash-text: #ffda6a; --flash-border: #665203;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117; --card: #161b22; --text: #e6edf3; --muted: #8b949e; --border: #30363d;
  --header-bg: #1f252d; --flash-bg: #332701; --flash-text: #ffda6a; --flash-border: #665203;
}
.site-header { margin: 0 -16px; }
.site-header #xmNavHead { margin-bottom: 0 !important; }
.site-header nav .container { box-sizing: border-box; max-width: none; padding: 20px 24px; }
.settings-form textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.settings-form iframe { width: 100%; height: 260px; border: 1px solid var(--border); border-radius: 6px; margin-top: 8px; background: #f6f7f9; }
.site-header > .container { padding: 10px 24px 0 !important; text-align: right; }
.site-header + .wrap, .menu-row + .wrap { padding-top: 16px; }
.theme-toggle-text { display: none; }
.site-header #linksHolder .btnMist { border-color: #04D0FB; color: #04D0FB !important; }
.site-header #linksHolder .btnMist:hover { background-color: #04D0FB; color: #1a1a1a !important; }
.site-header #linksHolder .btnFlare { border-color: #FF6613; color: #FF6613 !important; }
.site-header #linksHolder .btnFlare:hover { background-color: #FF6613; color: #fff !important; }
.site-header #linksHolder .btnMist .bi-bluesky { color: transparent; -webkit-text-stroke: 1px #04D0FB; }
.site-header #linksHolder .btnMist:hover .bi-bluesky { -webkit-text-stroke-color: #1a1a1a; }
.site-header #linksHolder .theme-toggle { display: inline-flex; align-items: center; gap: .4rem; width: 32px; height: 32px; border-radius: 50%; padding: .375rem .75rem; margin-left: .25rem; margin-top: -2px; font: 400 15px roboto, arial, sans-serif; color: #a0a3a5; border: 1px solid #a0a3a5; background: transparent; vertical-align: middle; }
.site-header #linksHolder .theme-toggle:hover { background: #a0a3a5; color: #fff; }
@media only screen and (max-width: 900px) {
  .site-header #burger + label { display: inline-block; }
  .site-header #linksHolder { overflow: hidden; position: absolute; background: #1a1a1a; left: 0; width: 100%; text-align: center; margin-top: 10px; height: 0; opacity: 0; transition: all 0.5s; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding-left: 24px; padding-right: 24px; box-sizing: border-box; }
  .site-header #burger:checked ~ #linksHolder { height: auto; padding-top: 12px; padding-bottom: 20px; opacity: 1; z-index: 5000; }
  .site-header #linksHolder a { width: auto; margin: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; border-width: 2px; }
  .site-header #linksHolder .theme-toggle { grid-column: 1 / -1; position: relative; width: auto; height: auto; min-height: 48px; margin: 0; padding: 0 4px; border: 0; border-top: 1px solid #444; border-radius: 0; justify-content: flex-start; gap: 8px; font-family: roboto, arial, sans-serif; font-size: 15px; color: #a0a3a5; }
  .site-header #linksHolder .theme-toggle:hover { background: transparent; border-color: #444; color: #fff; }
  .site-header #linksHolder .theme-toggle-text { display: inline; }
  .site-header #linksHolder .theme-toggle::after { content: ""; flex-shrink: 0; margin-left: auto; width: 40px; height: 22px; border-radius: 11px; background: #444; transition: background .2s; }
  .site-header #linksHolder .theme-toggle::before { content: ""; position: absolute; top: 50%; right: 25px; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: #a0a3a5; transition: right .2s, background .2s; }
  .site-header #linksHolder .theme-toggle[aria-checked="true"]::after { background: #03a1c2; }
  .site-header #linksHolder .theme-toggle[aria-checked="true"]::before { right: 7px; background: #fff; }
}
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; min-height: 32px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.menu-row { margin: 0 -16px; padding: 12px 24px 0; }
.page-menu { flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.menu-btn, .btn { display: inline-block; border: 1px solid var(--major); color: var(--major); border-radius: .25rem; padding: .3rem .7rem; font-size: 14px; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.btn { background: transparent; cursor: pointer; }
a.menu-btn:hover, a.btn:hover, .btn:not(:disabled):hover { background: var(--major); color: #fff; text-decoration: none; }
.menu-btn.current { background: var(--major); color: #fff; cursor: default; }
.btn:disabled { opacity: .4; cursor: default; }
.form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-bar { display: flex; flex-wrap: wrap; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 16px; }
.status-bar-seg { flex: 1 1 200px; padding: 14px 16px; font-weight: 600; text-decoration: none; }
.status-bar-seg + .status-bar-seg { border-left: 2px solid var(--bg); }
.overall-seg + .status-bar-seg { border-left: none; }
.status-bar-seg.overall-seg { flex: 0 0 auto; font-size: 1.3em; display: flex; align-items: center; }
.status-bar-seg.overall-seg:only-child { flex: 1 1 auto; }
.status-bar-seg .seg-sub { display: block; font-size: 0.8em; font-weight: 400; }
.status-bar-seg.status-1, .dot.status-1 { background: var(--op); }
.status-bar-seg.status-2, .dot.status-2 { background: var(--perf); }
.status-bar-seg.status-3, .dot.status-3 { background: var(--partial); }
.status-bar-seg.status-4, .dot.status-4 { background: var(--major); }
.theme-toggle { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.incident-status-0 { color: var(--muted); }
.incident-status-1 { color: var(--major); }
.incident-status-2 { color: var(--partial); }
.incident-status-3 { color: var(--perf); }
.incident-status-4 { color: var(--op); }
.incident-actions { display: flex; gap: 8px; align-items: center; }
body { min-height: 100vh; display: flex; flex-direction: column; box-sizing: border-box; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; padding: 0 16px; }
body > .wrap { flex: 1 0 auto; width: 100%; }
.site-footer { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 -16px; box-sizing: border-box; padding: 8px 24px 20px; }
.zsiq_floatmain.zsiq_theme11 { bottom: 69px; }
.footer-btn { display: inline-block; border: 1px solid; border-radius: .25rem; padding: .375rem .75rem; font-family: roboto, arial, sans-serif; font-size: 15px; font-weight: 400; text-decoration: none; }
.footer-btn:hover { color: #fff; text-decoration: none; }
.footer-blue { color: #03a1c2; border-color: #03a1c2; }
.footer-blue:hover { background: #03a1c2; }
.footer-yellow { color: #9EB231; border-color: #9EB231; }
.footer-yellow:hover { background: #9EB231; }
.site-footer .btnFlare { color: #FF6613; border-color: #FF6613; }
.site-footer .btnFlare:hover { background: #FF6613; color: #fff; }
button.danger { color: var(--major); border: 1px solid var(--major); background: var(--card); border-radius: 4px; cursor: pointer; }
.incident-meta { color: var(--muted); font-size: 0.9em; line-height: 1.6; margin-top: 6px; }
.incident-message { margin-top: 12px; overflow-wrap: anywhere; }
.incident-message > :first-child { margin-top: 0; }
.incident-message > :last-child { margin-bottom: 0; }
.incident-message p, .incident-message ul, .incident-message ol, .incident-message pre, .incident-message blockquote { margin: 0 0 12px; }
.incident-message ul, .incident-message ol { padding-left: 24px; }
.incident-message pre { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 8px; }
.incident-message blockquote { border-left: 3px solid var(--border); padding-left: 10px; color: var(--muted); }
.incident-form { display: flex; flex-direction: column; gap: 12px; }
.incident-form input[type="text"], .incident-form select, .incident-form textarea { width: 100%; box-sizing: border-box; }
.component-desc { font-style: italic; color: var(--muted); font-size: 0.85em; margin-top: 2px; }
.pref-tree, .pref-tree ul { list-style: none; padding-left: 20px; margin: 4px 0; }
.pref-tree { padding-left: 0; }
.pref-tree li { margin: 3px 0; }
.pref-group { font-weight: 600; }
.pref-overall { font-weight: 600; font-size: 1.1em; }
.pref-form { display: flex; flex-direction: column; gap: 8px; }
body.page-wide .wrap, body.status-wide .wrap { max-width: none; width: 100%; box-sizing: border-box; padding-left: 24px; padding-right: 24px; }
.pref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.pref-grid > .card { margin: 0; }
.pref-form > .card { margin-bottom: 0; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select { max-width: 100%; min-width: 0; }
.inline-form input[type="email"], .inline-form input[type="text"] { flex: 1 1 240px; max-width: 360px; }
.search-form { margin-bottom: 12px; }
.pager { display: flex; gap: 16px; align-items: center; }
.collapsed-hidden { display: none !important; }
.group-toggle { margin-left: auto; background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 4px; width: 26px; height: 26px; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.group-toggle:hover { color: var(--text); }
.group-toggle svg { transition: transform .15s; }
.group-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.wrap { max-width: 760px; margin: 0 auto; padding: 32px 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.overall { display: flex; align-items: center; gap: 10px; font-size: 1.3em; font-weight: 600; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.badge.status-1, .status-select.status-1 { color: var(--op); border-color: var(--op); }
.badge.status-2, .status-select.status-2 { color: var(--perf); border-color: var(--perf); }
.badge.status-3, .status-select.status-3 { color: var(--partial); border-color: var(--partial); }
.badge.status-4, .status-select.status-4 { color: var(--major); border-color: var(--major); }
.group-title { font-weight: 600; margin: 24px 0 8px; }
.component-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.component-row:last-child, .component-row.last-visible { border-bottom: none; }
.badge { font-size: 0.85em; padding: 1px 8px; border-radius: 10px; border: 1px solid currentColor; }
.status-select { font-size: 0.85em; }
.incident { padding: 10px 0; border-bottom: 1px solid var(--border); }
.incident:last-child { border-bottom: none; }
.incident .meta { color: var(--muted); font-size: 0.85em; margin-top: 4px; }
a { color: inherit; }
.flash { background: var(--flash-bg); color: var(--flash-text); border: 1px solid var(--flash-border); border-radius: 6px; padding: 10px 14px; margin-bottom: 16px; }
form.inline { display: inline; }
table.admin { width: 100%; border-collapse: collapse; }
table.admin th, table.admin td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.admin td:first-child { overflow-wrap: anywhere; }
table.admin button { white-space: nowrap; }
.card:has(> table.admin) { overflow-x: auto; }
input, select, textarea, button { font: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="datetime-local"], select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 4px 6px; }
.status-layout { display: grid; grid-template-columns: 1fr 640px; gap: 20px; align-items: start; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; align-items: start; margin-bottom: 16px; }
.status-grid.columns { display: flex; align-items: flex-start; }
.status-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.status-col > .status-group { margin-bottom: 0; }
.status-group { min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: var(--card); margin-bottom: 10px; }
.status-group[data-group-id] { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.status-group[data-group-id] > .card { margin: 0; padding: 0 10px; border-radius: 6px; }
.status-group .group-title { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 26px; }
.group-desc { margin: -4px 0 0; padding-left: 20px; }
.root-group { padding-top: 0; overflow: hidden; }
.root-group > .group-title { font-size: 1.15em; margin: 0 -10px; padding: 10px; background: var(--header-bg); border-bottom: 1px solid var(--border); }
.root-group > .group-desc { margin-top: 0; }
.root-group.is-empty { padding-bottom: 0; }
.root-group.is-empty > .group-title { border-bottom: none; }
@media (max-width: 860px) {
  .status-layout { grid-template-columns: 1fr; }
}
.group-title-toggle { cursor: pointer; user-select: none; -webkit-user-select: none; }
