:root {
  --bg: #f5f5f7;
  --surface: rgba(255,255,255,.88);
  --surface-solid: #fff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0,0,0,.08);
  --accent: #0071e3;
  --ok: #30a46c;
  --warning: #d9831f;
  --error: #e5484d;
  --shadow: 0 8px 30px rgba(0,0,0,.06);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(180%) blur(22px);
  background: rgba(245,245,247,.78);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { width: 100%; max-width: none; margin: 0 auto; height: 64px; padding: 0 clamp(18px, 2.2vw, 44px); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-size: 17px; font-weight: 680; letter-spacing: -.02em; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--muted); }
.nav a.active, .nav a:hover { color: var(--text); }
.inline-form { display: inline; margin: 0; }
.nav-button { appearance: none; border: 0; background: transparent; color: var(--muted); padding: 0; cursor: pointer; }
.nav-button:hover { color: var(--text); }
.page { max-width: 1180px; margin: 0 auto; padding: 54px 28px 80px; }
.page.page-wide { width: 100%; max-width: none; padding-left: clamp(18px, 2.2vw, 44px); padding-right: clamp(18px, 2.2vw, 44px); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading h1 { margin: 4px 0 0; font-size: clamp(34px, 5vw, 52px); line-height: 1.02; letter-spacing: -.045em; font-weight: 720; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.5; }
.button { border: 0; border-radius: 999px; padding: 10px 17px; font-weight: 620; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .12s ease, opacity .12s ease; }
.button:active { transform: scale(.98); }
.button.primary { color: white; background: var(--accent); }
.button.secondary { background: rgba(0,0,0,.06); color: var(--text); }
.button.danger { background: rgba(229,72,77,.12); color: var(--error); }
.actions { display: flex; gap: 10px; align-items: center; }
.actions form { margin: 0; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.page-wide .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(16px, 1.3vw, 24px); }
.status-card { min-height: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.status-card:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(0,0,0,.08); }
.card-topline { display: flex; justify-content: space-between; gap: 18px; }
.card-main-link { min-width: 0; flex: 1; }
.card-body-link { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.card-controls { display: flex; align-items: flex-start; gap: 14px; }
.card-title { font-size: 21px; font-weight: 690; letter-spacing: -.025em; }
.card-subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }
.status-dot { width: 10px; height: 10px; min-width: 10px; border-radius: 50%; background: #a1a1a6; display: inline-block; box-shadow: 0 0 0 4px rgba(161,161,166,.10); }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(48,164,108,.11); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 0 4px rgba(217,131,31,.11); }
.status-dot.error { background: var(--error); box-shadow: 0 0 0 4px rgba(229,72,77,.11); }
.status-summary { font-size: clamp(27px, 1.9vw, 34px); font-weight: 720; letter-spacing: -.04em; margin: 34px 0 auto; }
.metric-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 32px; }
.metric { min-width: 0; }
.metric span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.metric strong { font-size: 16px; white-space: nowrap; }
.card-foot { color: var(--muted); font-size: 12px; margin-top: 22px; }
.dashboard-hint { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.sort-save-state { min-height: 18px; margin-top: 10px; color: var(--muted); font-size: 12px; text-align: right; }
.sort-save-state.error { color: var(--error); }
.drag-handle { width: 30px; height: 30px; padding: 6px; border: 0; border-radius: 10px; background: transparent; display: grid; grid-template-columns: repeat(2, 4px); grid-auto-rows: 4px; gap: 3px; place-content: center; cursor: grab; opacity: .42; transition: opacity .15s ease, background .15s ease; touch-action: none; }
.drag-handle:hover, .drag-handle:focus-visible { opacity: .9; background: rgba(0,0,0,.055); outline: none; }
.drag-handle:active { cursor: grabbing; }
.drag-handle span { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-card.is-dragging { opacity: .42; transform: scale(.985); box-shadow: none; }
.status-card.drag-target { outline: 2px solid rgba(0,113,227,.24); outline-offset: 2px; }
.section-block { margin-top: 48px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title h2 { font-size: 20px; margin: 0; letter-spacing: -.02em; }
.list-card, .detail-card, .settings-card, .module-card, .auth-card { background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.list-row { min-height: 66px; display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.list-main span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row time { color: var(--muted); font-size: 12px; }
.event-mark { width: 7px; height: 7px; border-radius: 50%; background: #a1a1a6; }
.event-mark.error { background: var(--error); }.event-mark.warning { background: var(--warning); }.event-mark.info { background: var(--accent); }
.empty-state { text-align: center; padding: 90px 24px; border: 1px dashed rgba(0,0,0,.15); border-radius: var(--radius); }
.empty-state h2 { font-size: 28px; margin: 0 0 8px; }.empty-state p { color: var(--muted); margin: 0 0 22px; }
.module-list { display: grid; gap: 18px; }
.module-card { overflow: hidden; }
.module-head { display: flex; justify-content: space-between; gap: 30px; align-items: center; padding: 22px; }
.module-head h2 { margin: 0 0 5px; font-size: 20px; }.module-head p { margin: 0; color: var(--muted); }
.instance-row { border-top: 1px solid var(--line); padding: 15px 22px; display: flex; align-items: center; justify-content: space-between; }
.instance-row > div { display: flex; flex-direction: column; gap: 3px; }.instance-row span { color: var(--muted); font-size: 12px; }
.module-empty { border-top: 1px solid var(--line); padding: 18px 22px; color: var(--muted); font-size: 13px; }
.badge { border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 650; }.badge.error { background: rgba(229,72,77,.10); color: var(--error); }
.settings-card { max-width: 760px; overflow: hidden; margin-bottom: 20px; }
.settings-form { margin: 0; }
.form-section { padding: 24px; border-bottom: 1px solid var(--line); }.form-section:last-child { border-bottom: 0; }
.form-section h2 { font-size: 18px; margin: 0 0 20px; letter-spacing: -.02em; }
.form-section p { color: var(--muted); line-height: 1.55; }
label { display: block; font-size: 13px; font-weight: 620; margin: 0 0 18px; }
label:last-child { margin-bottom: 0; }
input[type="text"], input[type="url"], input[type="password"], input[type="number"], input:not([type]), textarea, select { width: 100%; border: 1px solid rgba(0,0,0,.12); background: rgba(0,0,0,.025); color: var(--text); border-radius: 12px; padding: 12px 13px; margin-top: 7px; outline: none; }
textarea { resize: vertical; min-height: 110px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-color: rgba(0,113,227,.55); box-shadow: 0 0 0 3px rgba(0,113,227,.10); }
label small { display: block; margin-top: 7px; color: var(--muted); font-weight: 400; line-height: 1.45; }.unit { color: var(--muted); font-weight: 400; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.toggle-row span { display: flex; flex-direction: column; }.toggle-row small { margin-top: 3px; }
.toggle-row input[type="checkbox"] { width: 42px; height: 24px; accent-color: var(--accent); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px; }
.danger-zone { max-width: 760px; margin-top: 36px; padding: 0 4px; }.danger-zone h2 { font-size: 17px; margin-bottom: 5px; }.danger-zone p { color: var(--muted); font-size: 13px; }
.hero-status { background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); }
.hero-status > div { display: flex; align-items: center; gap: 12px; }.hero-status strong { font-size: 20px; }.hero-status span:not(.status-dot) { color: var(--muted); }.hero-status time { color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 18px; }
.metric-card { background: var(--surface-solid); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.metric-card > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 9px; }.metric-card strong { font-size: 28px; letter-spacing: -.035em; }
.progress { height: 5px; border-radius: 99px; background: rgba(0,0,0,.07); overflow: hidden; margin-top: 15px; }.progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.detail-row { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 13px 18px; border-bottom: 1px solid var(--line); }.detail-row:last-child { border-bottom: 0; }.detail-row span { color: var(--muted); font-size: 13px; }.detail-row strong { font-size: 13px; overflow-wrap: anywhere; }.detail-row.warning strong { color: var(--warning); }
.error-box { max-width: 760px; background: rgba(229,72,77,.08); color: var(--error); border: 1px solid rgba(229,72,77,.14); border-radius: 14px; padding: 13px 15px; margin-top: 16px; font-size: 13px; line-height: 1.4; }
.flash-stack { margin-bottom: 20px; display: grid; gap: 8px; }.flash { padding: 11px 14px; border-radius: 12px; font-size: 13px; background: var(--surface-solid); border: 1px solid var(--line); }.flash.error { color: var(--error); background: rgba(229,72,77,.06); }.flash.success { color: var(--ok); background: rgba(48,164,108,.07); }.flash.warning { color: var(--warning); background: rgba(217,131,31,.07); }
.auth-shell { min-height: calc(100vh - 180px); display: grid; place-items: center; }.auth-card { width: min(430px,100%); padding: 28px; }.auth-card h1 { font-size: 32px; letter-spacing: -.04em; margin: 6px 0 8px; }.form-stack { margin-top: 24px; }.form-stack .button { width: 100%; margin-top: 4px; }
.warning-text { color: var(--warning) !important; }.migration-card { margin-top: 20px; }
@media (min-width: 2100px) {
  .page-wide .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 1280px) and (min-width: 761px) {
  .page-wide .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101012; --surface: rgba(29,29,31,.82); --surface-solid: #1c1c1e; --text: #f5f5f7; --muted: #a1a1a6; --line: rgba(255,255,255,.09); --shadow: 0 8px 30px rgba(0,0,0,.20); }
  .topbar { background: rgba(16,16,18,.80); }
  .button.secondary { background: rgba(255,255,255,.09); }
  input[type="text"], input[type="url"], input[type="password"], input[type="number"], input:not([type]), textarea { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
  .progress { background: rgba(255,255,255,.08); }
  .drag-handle:hover, .drag-handle:focus-visible { background: rgba(255,255,255,.08); }
}
@media (max-width: 760px) {
  .topbar-inner { padding: 0 18px; }.page, .page.page-wide { padding: 36px 18px 60px; }.nav { gap: 12px; }.nav a:nth-child(2) { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }.card-grid, .page-wide .card-grid, .metric-grid { grid-template-columns: 1fr; }.metric-row { grid-template-columns: repeat(3,1fr); }
  .hero-status { align-items: flex-start; flex-direction: column; gap: 10px; }.hero-status > div { flex-wrap: wrap; }.detail-row { grid-template-columns: 1fr; gap: 3px; }.list-row time { display: none; }
}

.check-row { align-items: flex-start; padding-top: 16px; padding-bottom: 16px; }
.check-row .status-dot { margin-top: 5px; }
.check-row .list-main > span { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
.check-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 7px; }
.check-meta span { color: var(--muted); font-size: 11px; white-space: nowrap; }


/* Module installer */
.module-upload-card {
  margin-bottom: 26px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.module-upload-form { margin: 0; }
.module-dropzone {
  margin: 0;
  padding: 30px 28px;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed rgba(0,113,227,.20);
  border-radius: calc(var(--radius) - 1px);
  background: rgba(0,113,227,.025);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.module-dropzone:hover,
.module-dropzone.is-dragover {
  border-color: rgba(0,113,227,.55);
  background: rgba(0,113,227,.055);
}
.module-dropzone.is-dragover { transform: scale(.995); }
.module-dropzone.has-file { border-style: solid; }
.module-dropzone input[type="file"] {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.module-upload-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 27px;
  line-height: 1;
  font-weight: 300;
}
.module-dropzone > strong { font-size: 19px; letter-spacing: -.02em; }
.module-dropzone > span:not(.module-upload-icon) { margin-top: 6px; color: var(--muted); font-weight: 500; }
.module-dropzone > small { max-width: 680px; margin-top: 10px; color: var(--muted); font-weight: 400; line-height: 1.45; }
.module-upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.module-upload-actions > span { color: var(--muted); font-size: 12px; }
.module-title-block { min-width: 0; }
.module-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.module-title-row h2 { margin: 0; }
.badge.neutral { background: rgba(0,0,0,.055); color: var(--muted); }
.module-error {
  margin: 0 22px 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(229,72,77,.08);
  color: var(--error);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.module-footer {
  min-height: 50px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}
.module-footer form { margin: 0; }
.module-remove-note { text-align: right; }
.text-button {
  appearance: none;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.text-button:hover { color: var(--text); }
.danger-text, .text-button.danger-text:hover { color: var(--error); }

@media (prefers-color-scheme: dark) {
  .badge.neutral { background: rgba(255,255,255,.08); }
  .module-dropzone { background: rgba(0,113,227,.04); }
}
@media (max-width: 760px) {
  .module-dropzone { min-height: 160px; padding: 24px 18px; }
  .module-upload-actions { align-items: stretch; flex-direction: column; }
  .module-upload-actions .button { width: 100%; }
  .module-footer { align-items: flex-start; flex-direction: column; }
  .module-remove-note { text-align: left; }
}


/* Saved credentials */
.secret-saved {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(48,164,108,.10);
  color: var(--ok);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .02em;
  vertical-align: 1px;
}

/* Dashboard visual cards */
.dashboard-kind-gauge,
.dashboard-kind-checks,
.dashboard-kind-stats { min-height: 300px; }

.gauge-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(142px, .85fr) minmax(150px, 1fr);
  align-items: center;
  gap: 24px;
  margin-top: 18px;
}
.gauge {
  --gauge-angle: 0deg;
  width: min(170px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(
      from 220deg,
      var(--accent) var(--gauge-angle),
      rgba(127,127,127,.13) 0 280deg,
      transparent 280deg 360deg
    );
  position: relative;
}
.gauge::after {
  content: "";
  position: absolute;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface-solid);
  box-shadow: inset 0 0 0 1px var(--line);
}
.gauge-inner {
  position: relative;
  z-index: 3;
  width: 50%;
  min-width: 0;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 2px;
  overflow: hidden;
}
.gauge-value {
  min-width: 0;
  max-width: 100%;
  display: grid;
  place-items: center;
  line-height: 1;
  letter-spacing: -.035em;
}
.gauge-value > span {
  max-width: 100%;
  font-size: clamp(17px, 1.65vw, 23px);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gauge-value > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .04em;
}
.gauge-center-label {
  max-width: 100%;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gauge-copy { display: grid; gap: 14px; }
.gauge-stat {
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.gauge-stat:last-child { border-bottom: 0; padding-bottom: 0; }
.gauge-stat span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.gauge-stat strong { font-size: 18px; letter-spacing: -.02em; }

.dashboard-checks {
  flex: 1;
  display: grid;
  align-content: start;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.dashboard-check {
  min-height: 37px;
  display: grid;
  grid-template-columns: 9px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}
.dashboard-check .status-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  box-shadow: none;
}
.dashboard-check-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.dashboard-check strong {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-stats {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  align-content: center;
  gap: 10px;
  margin-top: 20px;
}
.dashboard-stat {
  min-width: 0;
  min-height: 82px;
  padding: 13px 14px;
  border-radius: 15px;
  background: rgba(127,127,127,.055);
  border: 1px solid var(--line);
}
.dashboard-stat span,
.dashboard-stat small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.dashboard-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  letter-spacing: -.035em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-stat small { margin-top: 4px; }
.visual-footer {
  color: var(--muted);
  font-size: 11px;
  margin-top: 12px;
}

@media (max-width: 520px) {
  .gauge-layout { grid-template-columns: 1fr; gap: 18px; }
  .gauge { width: 150px; }
  .gauge-value > span { font-size: 19px; }
  .gauge-copy { width: 100%; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
}

.gauge.gauge-unknown {
  background:
    conic-gradient(
      from 220deg,
      rgba(127,127,127,.26) 0 280deg,
      transparent 280deg 360deg
    );
}


/* Google integration */
.google-settings-card .form-section { border-bottom: 0; }
.integration-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}
.integration-heading h2 { margin-bottom: 6px; }
.integration-heading p { margin: 0; }
.integration-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(127,127,127,.07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.embedded-form { margin-top: 0; }
.readonly-value {
  margin-top: 7px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(127,127,127,.045);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.inline-actions form { margin: 0; }
.google-connect-panel {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(127,127,127,.035);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.google-connect-panel > div:first-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.google-connect-panel strong { font-size: 14px; }
.google-connect-panel span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.integration-note {
  margin: 14px 0 0 !important;
  font-size: 12px;
}

/* Dual storage gauge */
.gauge-visual {
  display: grid;
  justify-items: center;
  gap: 11px;
}
.gauge {
  isolation: isolate;
}
.gauge-secondary {
  --gauge-secondary-angle: 0deg;
  position: absolute;
  z-index: 1;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(
      from 220deg,
      var(--ok) var(--gauge-secondary-angle),
      rgba(127,127,127,.10) 0 280deg,
      transparent 280deg 360deg
    );
}
.gauge-secondary.warning {
  background:
    conic-gradient(
      from 220deg,
      var(--warning) var(--gauge-secondary-angle),
      rgba(127,127,127,.10) 0 280deg,
      transparent 280deg 360deg
    );
}
.gauge-secondary.error {
  background:
    conic-gradient(
      from 220deg,
      var(--error) var(--gauge-secondary-angle),
      rgba(127,127,127,.10) 0 280deg,
      transparent 280deg 360deg
    );
}
.gauge-secondary::after {
  content: "";
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface-solid);
  box-shadow: inset 0 0 0 1px var(--line);
}
.gauge-inner {
  z-index: 3;
}
.gauge::after {
  z-index: 0;
}
.gauge-legend {
  width: 100%;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}
.gauge-legend span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.gauge-legend strong {
  color: var(--text);
  font-weight: 650;
}
.gauge-swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.gauge-swatch.primary { background: var(--accent); }
.gauge-swatch.secondary.ok { background: var(--ok); }
.gauge-swatch.secondary.warning { background: var(--warning); }
.gauge-swatch.secondary.error { background: var(--error); }

@media (max-width: 760px) {
  .integration-heading,
  .google-connect-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .integration-status { align-self: flex-start; }
}

.check-meta .check-link {
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}
.check-meta .check-link:hover { text-decoration: underline; }


/* Compact month calendar dashboard cards */
.dashboard-kind-calendar { min-height: 390px; }
.month-calendar {
  flex: 1;
  min-width: 0;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
}
.month-calendar-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.month-calendar-head > strong {
  min-width: 0;
  font-size: 17px;
  font-weight: 690;
  letter-spacing: -.025em;
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.month-calendar-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}
.month-calendar-today,
.month-calendar-arrow {
  appearance: none;
  font: inherit;
  border: 1px solid var(--line);
  background: rgba(127,127,127,.035);
  color: var(--text);
  user-select: none;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.month-calendar-today:hover,
.month-calendar-arrow:hover,
.month-calendar-today:focus-visible,
.month-calendar-arrow:focus-visible {
  background: rgba(0,113,227,.07);
  border-color: rgba(0,113,227,.24);
  outline: none;
}
.month-calendar-today {
  min-height: 29px;
  padding: 6px 9px;
  border-color: rgba(0,113,227,.24);
  border-radius: 8px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.month-calendar-arrow {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}
.month-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: rgba(127,127,127,.035);
}
.month-calendar-weekdays span {
  padding: 6px 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  text-align: center;
  text-transform: uppercase;
}
.month-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 1px;
  padding: 1px;
  padding-top: 0;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  background: var(--line);
}
.month-calendar-day {
  appearance: none;
  width: 100%;
  margin: 0;
  border: 0;
  font: inherit;
  position: relative;
  min-width: 0;
  min-height: 45px;
  padding: 5px 4px 4px;
  background: var(--surface-solid);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text);
}
.month-calendar-day.has-events {
  cursor: pointer;
}
.month-calendar-day.has-events:hover {
  background: rgba(0,113,227,.035);
}
.month-calendar-day.outside {
  color: var(--muted);
  opacity: .38;
}
.month-calendar-day.selected {
  box-shadow: inset 0 0 0 1px rgba(0,113,227,.32);
  background: rgba(0,113,227,.045);
}
.month-calendar-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.month-calendar-day.today .month-calendar-number {
  background: var(--accent);
  color: #fff;
  font-weight: 720;
}
.month-calendar-dots {
  min-height: 7px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.month-calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a1a1a6;
}
.month-calendar-dot.ok { background: var(--ok); }
.month-calendar-dot.warning { background: var(--warning); }
.month-calendar-dot.error { background: var(--error); }
.month-calendar-more {
  color: var(--muted);
  font-size: 7px;
  line-height: 1;
}
.month-calendar-agenda {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(127,127,127,.035);
}
.month-calendar-agenda-date {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
}
.month-calendar-agenda-event {
  min-width: 0;
  display: grid;
  grid-template-columns: 6px minmax(0,1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 22px;
}
.month-calendar-agenda-event + .month-calendar-agenda-event {
  border-top: 1px solid var(--line);
}
.month-calendar-agenda-event .month-calendar-dot {
  width: 6px;
  height: 6px;
}
.month-calendar-agenda-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.month-calendar-agenda-time {
  font-size: 10px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .dashboard-kind-calendar { min-height: 0; }
  .month-calendar-day { min-height: 49px; }
  .month-calendar-number { font-size: 11px; }
  .month-calendar-head > strong { font-size: 18px; }
}

.settings-subsection {
  padding-top: 4px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.settings-subsection:first-of-type {
  margin-top: 0;
  border-top: 0;
}
.settings-subsection h3 {
  margin: 18px 0 5px;
  font-size: 14px;
  letter-spacing: -.01em;
}
.settings-subsection:first-of-type h3 { margin-top: 0; }
.settings-subsection-help {
  margin: 0 0 18px !important;
  font-size: 12px;
}
select {
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.025);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 13px;
  margin-top: 7px;
  outline: none;
}
@media (prefers-color-scheme: dark) {
  select { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
}


/* Module background actions */
.module-action-panel {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.module-action-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.module-action-copy strong { font-size: 13px; }
.module-action-copy span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.module-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.module-action-buttons form { margin: 0; }

.backup-history-row { align-items: flex-start; }
.backup-history-row .list-main small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.backup-history-time {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: max-content;
}
.backup-history-time small {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media (max-width: 760px) {
  .module-action-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .module-action-buttons {
    justify-content: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .module-action-buttons .button { width: 100%; }
  .backup-history-time { display: none; }
}


/* Workspaces and users */
.nav-user {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  padding-left: 4px;
}
.workspace-switch {
  width: fit-content;
  max-width: 100%;
  margin: -8px 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(127,127,127,.045);
  display: flex;
  gap: 3px;
  overflow-x: auto;
}
.workspace-switch a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}
.workspace-switch a:hover { color: var(--text); }
.workspace-switch a.active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.workspace-badge {
  display: inline-flex;
  margin-left: 7px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  vertical-align: middle;
}
.settings-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.settings-link-row p { margin: 4px 0 0; }
.user-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}
.user-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}
.user-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.user-card-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.user-card-head strong { font-size: 16px; }
.user-card-head span:not(.status-dot) {
  color: var(--muted);
  font-size: 10px;
}
.user-card-form {
  margin: 14px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 9px;
}
.user-card-form > strong,
.workspace-access-picker > strong { font-size: 11px; }
.workspace-access-picker {
  display: grid;
  gap: 7px;
  margin-top: 6px;
}
.workspace-access-picker > small,
.user-admin-note {
  color: var(--muted);
  font-size: 10px;
}
.workspace-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.workspace-check {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(127,127,127,.035);
  font-size: 10px;
}
.workspace-check input {
  width: auto !important;
  margin: 0 !important;
}
@media (max-width: 760px) {
  .settings-link-row { align-items: stretch; flex-direction: column; }
  .user-grid { grid-template-columns: 1fr; }
  .nav-user { display: none; }
}


/* Persistent monitoring history */
.history-chart-grid {
  display: grid;
  gap: 14px;
}
.history-chart-card {
  padding: 16px 18px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}
.history-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}
.history-chart-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.history-chart-head strong { font-size: 13px; }
.history-chart-head span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.history-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}
.history-chart-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.history-chart-legend i {
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}
.history-chart-legend .history-series-2 i { background: var(--warning); }
.history-chart-legend .history-series-3 i { background: var(--error); }
.history-chart-stage {
  width: 100%;
  min-height: 190px;
}
.history-chart-stage.empty {
  min-height: 80px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}
.history-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.history-chart-gridline {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.history-chart-axis {
  fill: var(--muted);
  font-size: 9px;
  font-family: inherit;
}
.history-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.history-chart-line.series-2 { stroke: var(--warning); }
.history-chart-line.series-3 { stroke: var(--error); }
.history-chart-point {
  fill: var(--accent);
  stroke: var(--surface-solid);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.history-chart-point.series-2 { fill: var(--warning); }
.history-chart-point.series-3 { fill: var(--error); }

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}
.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 11px;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
.data-table th {
  color: var(--muted);
  background: rgba(127,127,127,.035);
  font-size: 9px;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.data-table th:first-child,
.data-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: var(--surface-solid);
}
.data-table th:first-child {
  background: var(--surface-solid);
}
.data-table tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 760px) {
  .history-chart-card { padding: 14px 12px 10px; }
  .history-chart-head { flex-direction: column; gap: 7px; }
  .history-chart-legend { justify-content: flex-start; }
  .history-chart-stage { min-height: 150px; }
}


.history-chart-tools {
  display: grid;
  justify-items: end;
  gap: 7px;
}
.history-chart-ranges {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(127,127,127,.035);
}
.history-chart-ranges button {
  appearance: none;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 5px 7px;
  font: inherit;
  font-size: 9px;
  font-weight: 680;
  cursor: pointer;
}
.history-chart-ranges button:hover { color: var(--text); }
.history-chart-ranges button.active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
@media (max-width: 760px) {
  .history-chart-tools { justify-items: start; }
}


/* Stats semantics added in core 0.9.3. Modules provide meaning, core owns styling. */
.dashboard-stat-hero { grid-column: span 2; }
.dashboard-stat-hero strong { font-size: 25px; }
.dashboard-stat strong.value-positive { color: var(--ok); }
.dashboard-stat strong.value-negative { color: var(--error); }
.dashboard-stat strong.value-neutral { color: var(--text); }
@media (max-width: 520px) {
  .dashboard-stat-hero { grid-column: 1 / -1; }
}


/* Module-specific connection panel */
.module-settings-panel {
  background: rgba(127,127,127,.025);
}
.module-settings-panel.ok {
  background: rgba(48,164,108,.045);
}
.module-settings-panel.warning {
  background: rgba(217,131,31,.045);
}
.module-settings-panel.error {
  background: rgba(229,72,77,.045);
}
.module-settings-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.module-settings-panel-head h2 {
  margin-bottom: 5px;
}
.module-settings-panel-head strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
}
.module-settings-panel .integration-status {
  flex: 0 0 auto;
}
.module-settings-panel .integration-status .status-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  box-shadow: none;
}
.module-settings-actions {
  margin-top: 18px;
}
@media (max-width: 760px) {
  .module-settings-panel-head {
    flex-direction: column;
  }
}


/* Operational health overview */
.dashboard-kind-health { min-height: 390px; }
.health-dashboard {
  flex: 1;
  min-width: 0;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
}
.health-score-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.health-score-head > div { min-width: 0; }
.health-score-head span:first-child {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 3px;
}
.health-score-head strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.045em;
}
.health-state {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(127,127,127,.08);
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.health-state.ok { color: var(--ok); background: rgba(48,164,108,.10); }
.health-state.warning { color: var(--warning); background: rgba(217,131,31,.10); }
.health-state.error { color: var(--error); background: rgba(229,72,77,.10); }
.health-scale {
  position: relative;
  height: 14px;
  margin-top: 18px;
  padding: 3px 0;
}
.health-scale-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #30a46c 0%, #91b94d 34%, #d7b43c 64%, #d9831f 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
}
.health-scale-pointer {
  --health-position: 0%;
  position: absolute;
  left: clamp(1px, var(--health-position), calc(100% - 1px));
  top: 0;
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: var(--text);
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px var(--surface-solid), 0 1px 4px rgba(0,0,0,.18);
}
.health-scale-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
  margin-top: 2px;
}
.health-items {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.health-item {
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.health-item:nth-child(odd) { padding-right: 12px; }
.health-item:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
.health-item span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 3px;
}
.health-item strong {
  display: block;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.check-category {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(127,127,127,.045);
  font-weight: 680;
}
@media (max-width: 520px) {
  .dashboard-kind-health { min-height: 0; }
  .health-score-head strong { font-size: 27px; }
}

/* Core 1.0 notification center */
.notification-enable-row,
.notification-instance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.notification-enable-row > input,
.notification-instance > input {
  width: auto;
  margin-top: 3px;
}
.notification-enable-row > span,
.notification-instance > span {
  min-width: 0;
}
.notification-enable-row strong,
.notification-instance strong {
  display: block;
}
.notification-enable-row small,
.notification-instance small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.notification-services {
  display: grid;
  gap: 6px;
}
.notification-instance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.notification-instance {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(127,127,127,.025);
}
.notification-instance:hover { background: rgba(127,127,127,.045); }
@media (max-width: 700px) {
  .notification-instance-grid { grid-template-columns: 1fr; }
}

/* Core 1.0.1 compact high-tech module cards */
.dashboard-heading {
  margin-bottom: 18px;
}
.dashboard-heading h1 {
  font-size: clamp(30px, 3.2vw, 40px);
}
.dashboard-hint {
  margin-top: 8px;
  font-size: 11px;
}
.workspace-switch {
  margin-top: -4px;
  margin-bottom: 14px;
}
.page-wide .card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.status-card {
  position: relative;
  min-height: 210px;
  padding: 15px 15px 13px;
  border-radius: 17px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0,113,227,.032), transparent 30%),
    var(--surface);
  box-shadow: 0 6px 22px rgba(0,0,0,.045);
}
.status-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: rgba(127,127,127,.32);
}
.status-card-ok::before { background: var(--ok); }
.status-card-warning::before { background: var(--warning); }
.status-card-error::before { background: var(--error); }
.status-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 26px rgba(0,0,0,.07);
}
.card-topline {
  gap: 10px;
  min-height: 38px;
}
.card-title {
  font-size: 17px;
  line-height: 1.08;
  font-weight: 720;
}
.card-subtitle {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.25;
}
.card-controls {
  gap: 7px;
  align-items: center;
}
.card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(127,127,127,.04);
  font-size: 8px;
  font-weight: 780;
  letter-spacing: .06em;
}
.card-status-badge.ok { color: var(--ok); background: rgba(48,164,108,.06); }
.card-status-badge.warning { color: var(--warning); background: rgba(217,131,31,.07); }
.card-status-badge.error { color: var(--error); background: rgba(229,72,77,.07); }
.card-status-badge .status-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  box-shadow: none;
}
.drag-handle {
  width: 24px;
  height: 24px;
  padding: 5px;
  grid-template-columns: repeat(2, 3px);
  grid-auto-rows: 3px;
  gap: 2px;
  border-radius: 7px;
}
.drag-handle span {
  width: 3px;
  height: 3px;
}
.card-body-link {
  margin-top: 6px;
}
.card-foot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-summary {
  margin: 16px 0 auto;
  font-size: clamp(21px, 1.45vw, 27px);
  line-height: 1.08;
}
.metric-row {
  gap: 9px;
  margin-top: 14px;
}
.metric span { font-size: 9px; }
.metric strong { font-size: 13px; }

/* Compact stats cards with optional micro meters */
.dashboard-kind-stats { min-height: 218px; }
.dashboard-stats {
  flex: 1;
  grid-template-columns: repeat(2, minmax(0,1fr));
  align-content: start;
  gap: 7px;
  margin-top: 9px;
}
.dashboard-stat {
  min-height: 58px;
  padding: 8px 9px;
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(0,113,227,.024), transparent 80%),
    rgba(127,127,127,.045);
}
.dashboard-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}
.dashboard-stat-head > span,
.dashboard-stat > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 640;
  letter-spacing: .015em;
}
.dashboard-stat-head .status-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  box-shadow: none;
}
.dashboard-stat strong {
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.05;
}
.dashboard-stat small {
  margin-top: 2px;
  min-height: 10px;
  font-size: 8px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-stat small.note-positive { color: var(--ok); }
.dashboard-stat small.note-negative { color: var(--error); }
.dashboard-stat small.note-warning { color: var(--warning); }
.dashboard-stat-meter {
  position: relative;
  height: 3px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(127,127,127,.12);
}
.dashboard-stat-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--accent);
}
.dashboard-stat-meter i.ok,
.dashboard-stat-meter i.positive { background: var(--ok); }
.dashboard-stat-meter i.warning { background: var(--warning); }
.dashboard-stat-meter i.error,
.dashboard-stat-meter i.negative { background: var(--error); }
.dashboard-stat-hero {
  grid-column: span 2;
  min-height: 61px;
  background:
    linear-gradient(90deg, rgba(0,113,227,.09), rgba(0,113,227,.018)),
    rgba(127,127,127,.035);
}
.dashboard-stat-hero strong {
  font-size: 20px;
}
.visual-footer {
  margin-top: 7px;
  font-size: 8px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Gauges: same information, much denser */
.dashboard-kind-gauge { min-height: 218px; }
.gauge-layout {
  grid-template-columns: minmax(96px,.72fr) minmax(100px,1fr);
  gap: 10px;
  margin-top: 8px;
}
.gauge { width: min(112px, 100%); }
.gauge::after { width: 72%; }
.gauge-value > span { font-size: 16px; }
.gauge-value > small,
.gauge-center-label { font-size: 7px; }
.gauge-legend {
  margin-top: 5px;
  gap: 3px;
}
.gauge-legend span { font-size: 7px; }
.gauge-copy { gap: 6px; }
.gauge-stat {
  padding-bottom: 6px;
}
.gauge-stat span { font-size: 8px; }
.gauge-stat strong { font-size: 13px; }

/* Check list cards */
.dashboard-kind-checks { min-height: 218px; }
.dashboard-checks {
  margin-top: 9px;
}
.dashboard-check {
  min-height: 27px;
  grid-template-columns: 6px minmax(0,1fr) auto;
  gap: 6px;
}
.dashboard-check .status-dot {
  width: 5px;
  height: 5px;
  min-width: 5px;
}
.dashboard-check-label,
.dashboard-check strong { font-size: 9px; }

/* WordPress health card */
.dashboard-kind-health { min-height: 218px; }
.health-dashboard {
  margin-top: 9px;
}
.health-score-head {
  align-items: center;
  gap: 8px;
}
.health-score-head span:first-child {
  margin-bottom: 2px;
  font-size: 8px;
}
.health-score-head strong {
  font-size: 22px;
}
.health-state {
  padding: 4px 6px;
  font-size: 7px;
}
.health-scale {
  height: 10px;
  margin-top: 10px;
  padding: 2px 0;
}
.health-scale-track { height: 6px; }
.health-scale-pointer { height: 10px; }
.health-scale-labels { font-size: 6px; }
.health-items {
  margin-top: 9px;
}
.health-item {
  padding: 6px 0;
}
.health-item:nth-child(odd) { padding-right: 7px; }
.health-item:nth-child(even) { padding-left: 7px; }
.health-item span { font-size: 7px; margin-bottom: 2px; }
.health-item strong { font-size: 11px; }

/* Calendar cards keep a little more room if a module uses them. */
.dashboard-kind-calendar { min-height: 260px; grid-column: span 2; }

/* Wider desktop = monitoring wall. */
@media (min-width: 1780px) {
  .page-wide .card-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
@media (max-width: 1320px) and (min-width: 981px) {
  .page-wide .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 980px) and (min-width: 761px) {
  .page-wide .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .page-wide .card-grid { grid-template-columns: 1fr; }
  .status-card,
  .dashboard-kind-stats,
  .dashboard-kind-gauge,
  .dashboard-kind-checks,
  .dashboard-kind-health { min-height: 0; }
  .dashboard-kind-calendar { grid-column: auto; }
  .card-status-badge { font-size: 7px; }
}
@media (prefers-color-scheme: dark) {
  .status-card {
    background:
      linear-gradient(180deg, rgba(32,124,255,.075), transparent 30%),
      var(--surface);
  }
  .dashboard-stat-hero {
    background:
      linear-gradient(90deg, rgba(32,124,255,.12), rgba(32,124,255,.02)),
      rgba(255,255,255,.025);
  }
}


/* Core 1.0.3 semantic instrument cards. Modules provide numbers and meaning. */
.dashboard-kind-instrument { min-height: 238px; }
.instrument-dashboard { min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; margin-top: 5px; }
.instrument-hero { min-height: 52px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 7px 0 8px; border-bottom: 1px solid var(--line); }
.instrument-hero-copy { min-width: 0; }
.instrument-hero-copy > span { display: block; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.instrument-hero-copy > strong { display: block; margin-top: 2px; font-size: 24px; line-height: 1; letter-spacing: -.045em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.instrument-hero-copy > small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.instrument-trend,.instrument-state { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(127,127,127,.045); color: var(--muted); font-size: 8px; font-weight: 760; }
.instrument-trend.positive { color: var(--ok); background: rgba(48,164,108,.07); }
.instrument-trend.negative { color: var(--error); background: rgba(229,72,77,.07); }
.instrument-trend.warning { color: var(--warning); background: rgba(217,131,31,.07); }
.instrument-state.ok { color: var(--ok); }.instrument-state.warning { color: var(--warning); }.instrument-state.error { color: var(--error); }
.instrument-state .status-dot { width: 5px; height: 5px; min-width: 5px; box-shadow: none; }
.instrument-chart-wrap { padding: 1px 0 2px; }
.instrument-chart-head { min-height: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 7px; }
.instrument-chart-head strong { color: var(--text); font-size: 8px; }
.instrument-bars { height: 58px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); align-items: end; gap: 4px; margin-top: 3px; }
.instrument-line-chart { position: relative; height: 68px; margin-top: 3px; }
.instrument-line-chart svg { display: block; width: 100%; height: 56px; overflow: visible; }
.instrument-line-series { fill: none; stroke: var(--accent); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.instrument-line-reference { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: .55; }
.instrument-line-reference-label { position: absolute; top: 1px; right: 0; color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .04em; }
.instrument-line-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: -1px; color: var(--muted); font-size: 6px; }
.instrument-bar-column { min-width: 0; height: 100%; display: grid; grid-template-rows: 1fr 10px; gap: 2px; }
.instrument-bar-track { min-height: 0; position: relative; display: flex; align-items: flex-end; border-radius: 4px 4px 2px 2px; overflow: hidden; background: linear-gradient(180deg, rgba(0,113,227,.015), rgba(127,127,127,.08)); }
.instrument-bar-track::after { content: ""; position: absolute; inset: 50% 0 auto; border-top: 1px dashed rgba(127,127,127,.13); }
.instrument-bar-track i { position: relative; z-index: 1; width: 100%; min-height: 3px; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, rgba(0,113,227,.68), var(--accent)); }
.instrument-bar-track i.ok,.instrument-bar-track i.positive { background: linear-gradient(180deg, rgba(48,164,108,.65), var(--ok)); }
.instrument-bar-track i.warning { background: linear-gradient(180deg, rgba(217,131,31,.65), var(--warning)); }
.instrument-bar-track i.error,.instrument-bar-track i.negative { background: linear-gradient(180deg, rgba(229,72,77,.65), var(--error)); }
.instrument-bar-column > span { color: var(--muted); font-size: 6px; text-align: center; white-space: nowrap; overflow: hidden; }
.instrument-items { margin-top: auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 10px; padding-top: 7px; border-top: 1px solid var(--line); }
.instrument-item { min-width: 0; display: grid; align-content: start; gap: 3px; }
.instrument-item-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.instrument-item-label { min-width: 0; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 7px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.instrument-item-label .status-dot { width: 5px; height: 5px; min-width: 5px; box-shadow: none; }
.instrument-item strong { flex: 0 0 auto; font-size: 10px; letter-spacing: -.01em; white-space: nowrap; }
.instrument-item small { min-width: 0; color: var(--muted); font-size: 7px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.instrument-item small.note-positive { color: var(--ok); }.instrument-item small.note-negative { color: var(--error); }.instrument-item small.note-warning { color: var(--warning); }
.instrument-meter { position: relative; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(127,127,127,.12); }
.instrument-meter i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--accent); }
.instrument-meter i.ok,.instrument-meter i.positive { background: var(--ok); }.instrument-meter i.warning { background: var(--warning); }.instrument-meter i.error,.instrument-meter i.negative { background: var(--error); }.instrument-meter i.neutral { background: var(--muted); }
.health-item-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }.health-item-head > span { margin-bottom: 0; }.health-item-head .status-dot { width: 5px; height: 5px; min-width: 5px; box-shadow: none; }
.health-item-meter { height: 3px; margin-top: 4px; border-radius: 999px; overflow: hidden; background: rgba(127,127,127,.12); }.health-item-meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }.health-item-meter i.ok { background: var(--ok); }.health-item-meter i.warning { background: var(--warning); }.health-item-meter i.error { background: var(--error); }
.gauge-stat-label { display: inline-flex !important; align-items: center; gap: 5px; }.gauge-stat-label .status-dot { width: 5px; height: 5px; min-width: 5px; box-shadow: none; }
@media (max-width:760px) { .dashboard-kind-instrument { min-height: 0; }.instrument-bars { height: 70px; }.instrument-line-chart { height: 80px; }.instrument-line-chart svg { height: 66px; } }


/* Core 1.0.4: larger dashboard cards, drawer navigation and module marks */
body.drawer-open { overflow: hidden; }
.topbar-inner { height: 58px; padding: 0 clamp(16px, 1.8vw, 34px); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-user { color: var(--muted); font-size: 12px; font-weight: 650; }
.menu-toggle { width: 36px; height: 36px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: rgba(127,127,127,.045); color: var(--text); cursor: pointer; display: grid; align-content: center; gap: 4px; }
.menu-toggle span { display: block; width: 100%; height: 2px; border-radius: 999px; background: currentColor; }
.menu-toggle:hover { background: rgba(127,127,127,.09); }
.drawer-backdrop { position: fixed; inset: 0; z-index: 69; background: rgba(0,0,0,.28); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s ease; }
.drawer-backdrop.is-open { opacity: 1; }
.app-drawer { position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(330px, 88vw); padding: 18px; display: flex; flex-direction: column; gap: 18px; background: var(--surface-solid); border-right: 1px solid var(--line); box-shadow: 18px 0 48px rgba(0,0,0,.14); transform: translateX(-102%); transition: transform .2s ease; overflow-y: auto; }
.app-drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 2px 10px; }
.drawer-head > div { min-width: 0; display: grid; gap: 2px; }
.drawer-head strong { font-size: 18px; letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-eyebrow,.drawer-section-label { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.drawer-close { width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(127,127,127,.07); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }
.drawer-nav { display: grid; gap: 5px; }
.drawer-nav a { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 12px; color: var(--muted); font-size: 14px; font-weight: 650; }
.drawer-nav a:hover,.drawer-nav a.active { color: var(--text); background: rgba(0,113,227,.08); }
.drawer-nav-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; background: rgba(127,127,127,.08); font-size: 12px; }
.drawer-section { padding: 14px 2px; border-top: 1px solid var(--line); }
.drawer-note { color: var(--muted); font-size: 11px; line-height: 1.5; }
.drawer-workspace-switch { display: grid; gap: 4px; margin-top: 8px; }
.drawer-workspace-switch a { display: flex; align-items: center; min-height: 38px; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 650; }
.drawer-workspace-switch a.active,.drawer-workspace-switch a:hover { color: var(--text); background: rgba(0,113,227,.08); }
.drawer-user { margin-top: auto; padding: 14px 2px 2px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.drawer-user > div { min-width: 0; display: grid; gap: 2px; }
.drawer-user span { color: var(--muted); font-size: 9px; }
.drawer-user strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-logout { border: 0; border-radius: 999px; padding: 7px 11px; background: rgba(127,127,127,.08); color: var(--muted); cursor: pointer; font-size: 11px; }
.drawer-logout:hover { color: var(--text); }

.dashboard-page { padding-top: 22px !important; }
.dashboard-page .card-grid { gap: 16px; }
.page-wide .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.status-card { min-height: 278px; padding: 18px 18px 15px; border-radius: 19px; }
.card-topline { min-height: 48px; align-items: flex-start; }
.card-main-link { display: flex; align-items: center; gap: 11px; }
.card-heading-copy { min-width: 0; }
.card-title { font-size: 18px; }
.card-subtitle { font-size: 10px; }
.card-body-link { margin-top: 9px; }
.card-foot { margin-top: 13px; padding-top: 9px; font-size: 9px; }
.card-status-badge { min-height: 24px; padding: 3px 7px; font-size: 8px; }

.module-mark { --mark-bg: rgba(0,113,227,.10); --mark-fg: var(--accent); width: 38px; height: 38px; min-width: 38px; border-radius: 12px; display: grid; place-items: center; position: relative; overflow: hidden; border: 1px solid rgba(0,113,227,.12); background: var(--mark-bg); color: var(--mark-fg); font-size: 18px; font-weight: 820; letter-spacing: -.05em; }
.module-icon-globe { --mark-bg: #eef2f4; --mark-fg: #21759b; border-radius: 50%; font-family: Georgia,serif; font-weight: 700; }
.module-icon-currency-bitcoin { --mark-bg: #fff2d8; --mark-fg: #f7931a; border-radius: 50%; font-size: 22px; }
.module-icon-code { --mark-bg: #edf2ff; --mark-fg: #5169d8; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 12px; letter-spacing: -.08em; }
.module-icon-cloud { --mark-bg: #eef5ff; --mark-fg: #4285f4; font-size: 20px; }
.module-icon-cloud-download { --mark-bg: #edf7ff; --mark-fg: #2699fb; font-size: 20px; }
.module-icon-money { --mark-bg: #eef5ff; --mark-fg: #4285f4; }
.mark-money { font-size: 20px; font-weight: 800; }
.module-icon-chart { --mark-bg: #fff1e5; --mark-fg: #e37400; }
.mark-bars { width: 22px; height: 23px; display: flex; align-items: flex-end; gap: 3px; }
.mark-bars i { flex: 1; border-radius: 3px 3px 1px 1px; background: #f9ab00; }
.mark-bars i:nth-child(1) { height: 45%; background: #f9ab00; }.mark-bars i:nth-child(2) { height: 72%; background: #e37400; }.mark-bars i:nth-child(3) { height: 100%; background: #e37400; }
.module-icon-search { --mark-bg: #eef5ff; --mark-fg: #4285f4; }
.mark-search { width: 18px; height: 18px; border: 3px solid #4285f4; border-radius: 50%; position: relative; }
.mark-search::after { content: ""; position: absolute; width: 9px; height: 3px; border-radius: 999px; background: #34a853; right: -8px; bottom: -5px; transform: rotate(45deg); transform-origin: left center; }

.dashboard-kind-instrument,.dashboard-kind-gauge,.dashboard-kind-health,.dashboard-kind-stats,.dashboard-kind-checks { min-height: 286px; }
.instrument-dashboard { gap: 10px; margin-top: 7px; }
.instrument-hero { min-height: 62px; padding: 8px 0 10px; }
.instrument-hero-copy > span { font-size: 9px; }.instrument-hero-copy > strong { font-size: 28px; }.instrument-hero-copy > small { font-size: 9px; }
.instrument-trend,.instrument-state { padding: 5px 8px; font-size: 9px; }
.instrument-chart-head { min-height: 17px; font-size: 8px; }.instrument-chart-head strong { font-size: 9px; }
.instrument-bars { height: 78px; gap: 5px; margin-top: 4px; }.instrument-line-chart { height: 90px; margin-top: 4px; }.instrument-line-chart svg { height: 74px; }.instrument-line-axis { font-size: 7px; }.instrument-line-reference-label { font-size: 8px; }.instrument-bar-column { grid-template-rows: 1fr 12px; }.instrument-bar-column > span { font-size: 7px; }
.instrument-items { gap: 8px 14px; padding-top: 9px; }.instrument-item-label { font-size: 8px; }.instrument-item strong { font-size: 12px; }.instrument-item small { font-size: 8px; }
.instrument-meter { height: 5px; }
.gauge-layout { grid-template-columns: minmax(128px,.82fr) minmax(130px,1fr); gap: 16px; margin-top: 14px; }.gauge { width: min(145px,100%); }.gauge-value > span { font-size: 20px; }.gauge-stat span { font-size: 9px; }.gauge-stat strong { font-size: 15px; }
.health-dashboard { margin-top: 12px; }.health-score-head strong { font-size: 28px; }.health-item span { font-size: 8px; }.health-item strong { font-size: 13px; }.health-item { padding: 8px 0; }
.dashboard-stats { gap: 9px; margin-top: 11px; }.dashboard-stat { min-height: 70px; padding: 10px 11px; }.dashboard-stat strong { font-size: 19px; }.dashboard-stat-head > span,.dashboard-stat > span { font-size: 9px; }
.dashboard-check { min-height: 34px; }.dashboard-check-label,.dashboard-check strong { font-size: 10px; }

@media (min-width: 1700px) { .page-wide .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 1499px) and (min-width: 1051px) { .page-wide .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 1050px) and (min-width: 721px) { .page-wide .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 720px) {
  .topbar-user { display: none; }
  .page-wide .card-grid { grid-template-columns: 1fr; }
  .status-card,.dashboard-kind-instrument,.dashboard-kind-gauge,.dashboard-kind-health,.dashboard-kind-stats,.dashboard-kind-checks { min-height: 0; }
  .module-mark { width: 35px; height: 35px; min-width: 35px; }
}
@media (prefers-color-scheme: dark) {
  .module-icon-globe { --mark-bg: rgba(33,117,155,.16); }
  .module-icon-currency-bitcoin { --mark-bg: rgba(247,147,26,.14); }
  .module-icon-cloud,.module-icon-chart { --mark-bg: rgba(244,129,32,.13); }
  .module-icon-search,.module-icon-money,.module-icon-cloud-download,.module-icon-cloud { --mark-bg: rgba(66,133,244,.12); }
}


/* Core 1.0.5: readable desktop scale. Keep four columns, enlarge card internals. */
.topbar-inner {
  height: 68px;
  padding-left: clamp(20px, 2vw, 40px);
  padding-right: clamp(20px, 2vw, 40px);
}
.brand { font-size: 20px; }
.topbar-left { gap: 14px; }
.topbar-user { font-size: 14px; }
.menu-toggle {
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 13px;
  gap: 5px;
}

.dashboard-page {
  padding-top: 28px !important;
  padding-left: clamp(22px, 2.1vw, 42px) !important;
  padding-right: clamp(22px, 2.1vw, 42px) !important;
}
.dashboard-page .card-grid { gap: 20px; }
.page-wide .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }

.status-card {
  min-height: 332px;
  padding: 22px 22px 18px;
  border-radius: 21px;
}
.card-topline {
  min-height: 56px;
  gap: 14px;
}
.card-main-link { gap: 13px; }
.card-title { font-size: 21px; line-height: 1.08; }
.card-subtitle { margin-top: 3px; font-size: 11px; }
.workspace-badge { font-size: 9px; padding: 2px 5px; }
.card-controls { gap: 10px; }
.card-status-badge {
  min-height: 27px;
  padding: 4px 8px;
  font-size: 9px;
}
.card-status-badge .status-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
}
.drag-handle { width: 27px; height: 31px; }
.card-body-link { margin-top: 11px; }
.card-foot {
  margin-top: 16px;
  padding-top: 11px;
  font-size: 10px;
}

.module-mark {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 14px;
  font-size: 21px;
}
.module-icon-currency-bitcoin { font-size: 26px; }
.module-icon-cloud,
.module-icon-cloud-download { font-size: 23px; }
.module-icon-code { font-size: 13px; }
.module-icon-cloud { font-size: 9px; }
.mark-money { font-size: 23px; }
.mark-bars { width: 25px; height: 27px; gap: 4px; }
.mark-search { width: 21px; height: 21px; border-width: 3px; }

.dashboard-kind-instrument,
.dashboard-kind-gauge,
.dashboard-kind-health,
.dashboard-kind-stats,
.dashboard-kind-checks {
  min-height: 340px;
}

/* Semantic instrument cards */
.instrument-dashboard {
  gap: 12px;
  margin-top: 9px;
}
.instrument-hero {
  min-height: 76px;
  gap: 12px;
  padding: 10px 0 12px;
}
.instrument-hero-copy > span { font-size: 10px; }
.instrument-hero-copy > strong { margin-top: 3px; font-size: 34px; }
.instrument-hero-copy > small { margin-top: 5px; font-size: 10px; }
.instrument-trend,
.instrument-state {
  gap: 6px;
  padding: 6px 10px;
  font-size: 10px;
}
.instrument-state .status-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
}
.instrument-chart-head {
  min-height: 20px;
  font-size: 9px;
}
.instrument-chart-head strong { font-size: 10px; }
.instrument-bars {
  height: 96px;
  gap: 6px;
  margin-top: 5px;
}
.instrument-line-chart { height: 108px; margin-top: 5px; }
.instrument-line-chart svg { height: 90px; }
.instrument-line-axis { font-size: 8px; }
.instrument-line-reference-label { font-size: 9px; }
.instrument-bar-column {
  grid-template-rows: 1fr 14px;
  gap: 3px;
}
.instrument-bar-column > span { font-size: 8px; }
.instrument-items {
  gap: 10px 16px;
  padding-top: 11px;
}
.instrument-item { gap: 5px; }
.instrument-item-head { gap: 8px; }
.instrument-item-label {
  gap: 6px;
  font-size: 9px;
}
.instrument-item-label .status-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
}
.instrument-item strong { font-size: 14px; }
.instrument-item small {
  font-size: 9px;
  line-height: 1.25;
}
.instrument-meter { height: 6px; }

/* Gauge cards */
.gauge-layout {
  grid-template-columns: minmax(154px,.86fr) minmax(150px,1fr);
  gap: 20px;
  margin-top: 17px;
}
.gauge { width: min(172px,100%); }
.gauge-value > span { font-size: 25px; }
.gauge-value > small,
.gauge-center-label { font-size: 9px; }
.gauge-legend {
  margin-top: 8px;
  gap: 5px;
}
.gauge-legend span { font-size: 9px; }
.gauge-copy { gap: 9px; }
.gauge-stat { padding-bottom: 9px; }
.gauge-stat span { font-size: 10px; }
.gauge-stat strong { font-size: 17px; }
.gauge-stat-label .status-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
}

/* WordPress health */
.health-dashboard { margin-top: 15px; }
.health-score-head { gap: 12px; }
.health-score-head span:first-child { font-size: 10px; }
.health-score-head strong { font-size: 34px; }
.health-state {
  padding: 6px 9px;
  font-size: 9px;
}
.health-scale {
  height: 14px;
  margin-top: 13px;
  padding: 3px 0;
}
.health-scale-track { height: 8px; }
.health-scale-pointer { height: 14px; }
.health-scale-labels { font-size: 8px; }
.health-items { margin-top: 13px; }
.health-item { padding: 9px 0; }
.health-item:nth-child(odd) { padding-right: 10px; }
.health-item:nth-child(even) { padding-left: 10px; }
.health-item span { font-size: 9px; }
.health-item strong { font-size: 15px; }
.health-item-head .status-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
}
.health-item-meter {
  height: 5px;
  margin-top: 6px;
}

/* Stats/checks cards */
.dashboard-stats {
  gap: 11px;
  margin-top: 14px;
}
.dashboard-stat {
  min-height: 82px;
  padding: 12px 13px;
  border-radius: 15px;
}
.dashboard-stat strong { font-size: 22px; }
.dashboard-stat-head > span,
.dashboard-stat > span { font-size: 10px; }
.dashboard-stat small { font-size: 9px; }
.dashboard-stat-meter { height: 5px; }

.dashboard-checks { margin-top: 13px; }
.dashboard-check {
  min-height: 39px;
  grid-template-columns: 7px minmax(0,1fr) auto;
  gap: 8px;
}
.dashboard-check .status-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
}
.dashboard-check-label,
.dashboard-check strong { font-size: 11px; }

.visual-footer {
  margin-top: 10px;
  font-size: 9px;
  line-height: 1.35;
}

/* Keep the same four-column desktop composition. */
@media (min-width: 1700px) {
  .page-wide .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 1499px) and (min-width: 1051px) {
  .page-wide .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 1050px) and (min-width: 721px) {
  .page-wide .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .topbar-inner { height: 60px; }
  .brand { font-size: 17px; }
  .menu-toggle { width: 38px; height: 38px; }
  .dashboard-page { padding-top: 18px !important; }
  .page-wide .card-grid { grid-template-columns: 1fr; }
  .status-card,
  .dashboard-kind-instrument,
  .dashboard-kind-gauge,
  .dashboard-kind-health,
  .dashboard-kind-stats,
  .dashboard-kind-checks { min-height: 0; }
  .module-mark {
    width: 39px;
    height: 39px;
    min-width: 39px;
  }
}


/* Core 1.0.6: match the preferred ~150% browser readability at native 100% zoom. */
.topbar-inner { height: 74px; padding-left: clamp(24px, 2.4vw, 46px); padding-right: clamp(24px, 2.4vw, 46px); }
.brand { font-size: 23px; letter-spacing: -.025em; }
.topbar-left { gap: 16px; }
.topbar-user { font-size: 15px; }
.menu-toggle { width: 46px; height: 46px; padding: 10px; border-radius: 14px; }

.dashboard-page { padding-top: 32px !important; padding-left: clamp(28px, 2.5vw, 52px) !important; padding-right: clamp(28px, 2.5vw, 52px) !important; }
.dashboard-page .card-grid { gap: 22px; }
.page-wide .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }

.status-card { min-height: 386px; padding: 25px 25px 21px; border-radius: 23px; }
.card-topline { min-height: 64px; gap: 15px; }
.card-main-link { gap: 15px; }
.card-title { font-size: 24px; line-height: 1.08; }
.card-subtitle { margin-top: 4px; font-size: 13px; }
.workspace-badge { font-size: 10px; padding: 2px 6px; }
.card-controls { gap: 11px; }
.card-status-badge { min-height: 30px; padding: 5px 10px; font-size: 10px; }
.card-status-badge .status-dot { width: 7px; height: 7px; min-width: 7px; }
.drag-handle { width: 30px; height: 34px; }
.card-body-link { margin-top: 13px; }
.card-foot { margin-top: 19px; padding-top: 13px; font-size: 11px; }

.module-mark { width: 50px; height: 50px; min-width: 50px; border-radius: 15px; font-size: 24px; }
.module-icon-currency-bitcoin { font-size: 30px; }
.module-icon-cloud,.module-icon-cloud-download { font-size: 26px; }
.module-icon-code { font-size: 14px; }
.module-icon-cloud { font-size: 10px; }
.mark-money { font-size: 27px; }
.mark-bars { width: 28px; height: 31px; gap: 4px; }
.mark-search { width: 24px; height: 24px; border-width: 4px; }

.dashboard-kind-instrument,.dashboard-kind-gauge,.dashboard-kind-health,.dashboard-kind-stats,.dashboard-kind-checks { min-height: 394px; }

.instrument-dashboard { gap: 14px; margin-top: 10px; }
.instrument-hero { min-height: 88px; gap: 14px; padding: 12px 0 14px; }
.instrument-hero-copy > span { font-size: 11px; }
.instrument-hero-copy > strong { margin-top: 4px; font-size: 40px; letter-spacing: -.05em; }
.instrument-hero-copy > small { margin-top: 6px; font-size: 11px; }
.instrument-trend,.instrument-state { gap: 7px; padding: 7px 12px; font-size: 11px; }
.instrument-state .status-dot { width: 7px; height: 7px; min-width: 7px; }
.instrument-chart-head { min-height: 23px; font-size: 10px; }
.instrument-chart-head strong { font-size: 11px; }
.instrument-bars { height: 118px; gap: 7px; margin-top: 6px; }
.instrument-line-chart { height: 132px; margin-top: 6px; }
.instrument-line-chart svg { height: 110px; }
.instrument-line-axis { font-size: 9px; }
.instrument-line-reference-label { font-size: 10px; }
.instrument-bar-column { grid-template-rows: 1fr 16px; gap: 4px; }
.instrument-bar-column > span { font-size: 9px; }
.instrument-items { gap: 12px 18px; padding-top: 13px; }
.instrument-item { gap: 6px; }
.instrument-item-head { gap: 10px; }
.instrument-item-label { gap: 7px; font-size: 10px; }
.instrument-item-label .status-dot { width: 7px; height: 7px; min-width: 7px; }
.instrument-item strong { font-size: 16px; }
.instrument-item small { font-size: 10px; line-height: 1.3; }
.instrument-meter { height: 7px; }
.instrument-hero-copy > strong.countdown-expired { color: var(--warning); }

.gauge-layout { grid-template-columns: minmax(176px,.9fr) minmax(170px,1fr); gap: 22px; margin-top: 20px; }
.gauge { width: min(202px,100%); }
.gauge-value > span { font-size: 29px; }
.gauge-value > small,.gauge-center-label { font-size: 10px; }
.gauge-legend { margin-top: 10px; gap: 6px; }
.gauge-legend span { font-size: 10px; }
.gauge-copy { gap: 11px; }
.gauge-stat { padding-bottom: 11px; }
.gauge-stat span { font-size: 11px; }
.gauge-stat strong { font-size: 20px; }
.gauge-stat-label .status-dot { width: 7px; height: 7px; min-width: 7px; }

.health-dashboard { margin-top: 17px; }
.health-score-head { gap: 14px; }
.health-score-head span:first-child { font-size: 11px; }
.health-score-head strong { font-size: 39px; }
.health-state { padding: 7px 11px; font-size: 10px; }
.health-scale { height: 16px; margin-top: 15px; padding: 4px 0; }
.health-scale-track { height: 9px; }
.health-scale-pointer { height: 16px; }
.health-scale-labels { font-size: 9px; }
.health-items { margin-top: 15px; }
.health-item { padding: 11px 0; }
.health-item:nth-child(odd) { padding-right: 12px; }
.health-item:nth-child(even) { padding-left: 12px; }
.health-item span { font-size: 10px; }
.health-item strong { font-size: 17px; }
.health-item-head .status-dot { width: 7px; height: 7px; min-width: 7px; }
.health-item-meter { height: 6px; margin-top: 7px; }

.dashboard-stats { gap: 13px; margin-top: 16px; }
.dashboard-stat { min-height: 96px; padding: 14px 15px; border-radius: 17px; }
.dashboard-stat strong { font-size: 25px; }
.dashboard-stat-head > span,.dashboard-stat > span { font-size: 11px; }
.dashboard-stat small { font-size: 10px; }
.dashboard-stat-meter { height: 6px; }

.dashboard-checks { margin-top: 15px; }
.dashboard-check { min-height: 44px; grid-template-columns: 8px minmax(0,1fr) auto; gap: 9px; }
.dashboard-check .status-dot { width: 7px; height: 7px; min-width: 7px; }
.dashboard-check-label,.dashboard-check strong { font-size: 12px; }

.visual-footer { margin-top: 12px; font-size: 10px; line-height: 1.4; }

@media (min-width: 1700px) { .page-wide .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 1499px) and (min-width: 1051px) { .page-wide .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 1050px) and (min-width: 721px) { .page-wide .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 720px) {
  .topbar-inner { height: 62px; }
  .brand { font-size: 18px; }
  .menu-toggle { width: 40px; height: 40px; }
  .dashboard-page { padding-top: 18px !important; padding-left: 16px !important; padding-right: 16px !important; }
  .page-wide .card-grid { grid-template-columns: 1fr; }
  .status-card,.dashboard-kind-instrument,.dashboard-kind-gauge,.dashboard-kind-health,.dashboard-kind-stats,.dashboard-kind-checks { min-height: 0; }
  .module-mark { width: 42px; height: 42px; min-width: 42px; }
}

.refresh-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.refresh-pending-badge::before,
.refresh-pending-note::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: refresh-spin .8s linear infinite;
  flex: 0 0 auto;
}
.refresh-pending-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
@keyframes refresh-spin { to { transform: rotate(360deg); } }
