/* Linguagem visual do XMed: Poppins e Inter, azul blue-700, navy, cartões brancos com tarja e pílulas. */
:root {
  color-scheme: light;
  --bg: #f9fafb;
  --surface: #fff;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #111827;
  --text-soft: #4b5563;
  --text-mute: #6b7280;
  --brand: #1a56db;
  --brand-deep: #1e429f;
  --brand-tint: #e1effe;
  --ok: #057a55;
  --ok-deep: #03543f;
  --ok-tint: #def7ec;
  --ok-cell: #84e1bc;
  --warn: #c27803;
  --warn-deep: #723b13;
  --warn-tint: #fdf6b2;
  --danger: #e02424;
  --danger-deep: #9b1c1c;
  --danger-tint: #fde8e8;
  --navy: #12234f;
  --navy-line: #2b3d6e;
  --navy-soft: #bccbe8;
  --heading: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05);
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.main:focus { outline: none; }

.material-symbols-outlined { font-size: 20px; line-height: 1; }

/* Estrutura */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line), 4px 0 16px -12px rgba(17, 24, 39, .2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
}

.brand-text { font: 500 17px/1 var(--heading); letter-spacing: -.01em; }
.brand-text b { font-weight: 700; color: var(--brand); }

.side-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 16px; }

.side-title {
  margin: 18px 0 6px;
  padding: 0 12px;
  color: var(--text-mute);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.side-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .12s, color .12s;
}

.side-item .material-symbols-outlined { color: #9ca3af; }
.side-item:hover { background: #f3f4f6; color: var(--text); }

.side-item[aria-current="page"] { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.side-item[aria-current="page"] .material-symbols-outlined { color: #2563eb; }
.side-item[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #2563eb;
}

.side-item .count {
  margin-left: auto;
  padding: 0 7px;
  border-radius: 99px;
  background: var(--danger-tint);
  color: var(--danger-deep);
  font-size: 12px;
  font-weight: 600;
}

.side-foot { padding: 8px 12px 12px; border-top: 1px solid var(--line); }

.dot { flex: none; width: 10px; height: 10px; margin: 0 5px; border-radius: 50%; background: #9ca3af; }
.side-item[data-state="UP"] .dot, .dot[data-state="UP"] { background: #0e9f6e; }
.side-item[data-state="UNSTABLE"] .dot, .dot[data-state="UNSTABLE"] { background: var(--warn); }
.side-item[data-state="DOWN"] .dot, .dot[data-state="DOWN"] { background: var(--danger); }

.main { min-width: 0; padding: 24px 32px 48px; }
.view { display: grid; gap: 20px; max-width: 1180px; margin: 0 auto; }
.loading { padding: 40px 0; color: var(--text-mute); text-align: center; }

/* Faixa de situação */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  overflow: hidden;
  padding: 28px 32px 32px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 3px 12px 3px 8px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
}

.hero-kicker .material-symbols-outlined { font-size: 18px; }
.hero[data-mood="UP"] .hero-kicker { background: var(--ok-tint); color: var(--ok-deep); }
.hero[data-mood="UNSTABLE"] .hero-kicker { background: var(--warn-tint); color: var(--warn-deep); }
.hero[data-mood="DOWN"] .hero-kicker { background: var(--danger-tint); color: var(--danger-deep); }
.hero[data-mood="PENDING"] .hero-kicker { background: var(--brand-tint); color: var(--brand-deep); }

.hero h1 {
  font: 700 clamp(26px, 3.2vw, 36px)/1.15 var(--heading);
  letter-spacing: -.02em;
  text-wrap: balance;
}

.hero-sub { margin-top: 8px; color: var(--navy-soft); }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.hero-next { color: var(--navy-soft); font-size: 13px; }

.hero-progress { position: absolute; inset: auto 0 0; height: 4px; background: var(--navy-line); }
.hero-progress span { display: block; height: 100%; background: #76a9fa; }

.hosts { display: grid; gap: 10px; min-width: 260px; }

.host {
  padding: 12px 14px;
  border: 1px solid var(--navy-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
}

.host[data-state="DOWN"] { border-color: #f98080; }
.host[data-state="UNSTABLE"] { border-color: #faca15; }

.host-head { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; font-weight: 600; }
.host-head span:last-child { color: var(--navy-soft); font-weight: 500; }

.host-list { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 13px; color: var(--navy-soft); }
.host-list li { display: inline-flex; align-items: center; }
.host-list .dot { width: 8px; height: 8px; margin: 0 6px 0 0; }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .12s, border-color .12s;
}

.btn:hover { background: #f3f4f6; }
.btn:disabled { cursor: progress; opacity: .7; }
.btn .material-symbols-outlined { font-size: 18px; }
.btn-primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-wide { width: 100%; min-height: 44px; }
.hero .btn { border-color: #fff; }
.hero .btn:focus-visible { outline-color: #fff; }

/* Indicadores */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.kpi {
  position: relative;
  display: flex;
  gap: 14px;
  overflow: hidden;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tone); }
.kpi[data-tone="brand"] { --tone: var(--brand); --tone-bg: var(--brand-tint); }
.kpi[data-tone="ok"] { --tone: var(--ok); --tone-bg: var(--ok-tint); }
.kpi[data-tone="warn"] { --tone: var(--warn); --tone-bg: var(--warn-tint); }
.kpi[data-tone="danger"] { --tone: var(--danger); --tone-bg: var(--danger-tint); }

.kpi-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--tone-bg);
  color: var(--tone);
}

.kpi-value { font: 700 26px/1.1 var(--heading); letter-spacing: -.02em; }
.kpi-label { margin-top: 4px; font-size: 14px; font-weight: 600; }
.kpi-hint { color: var(--text-mute); font-size: 12.5px; }

/* Painéis */
.panel {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 { font: 600 17px/1.3 var(--heading); letter-spacing: -.01em; }
.panel-note { color: var(--text-mute); font-size: 13px; }
.panel-body { padding: 16px 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text-mute); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; background: #f3f4f6; }
.legend i.ok, .cell.ok, .day.ok { background: var(--ok-cell); }
.legend i.some, .cell.some, .day.some { background: #faca15; }
.legend i.bad, .cell.bad, .day.bad { background: var(--danger); }

/* Sistemas e linha do tempo */
.grid-row {
  display: grid;
  grid-template-columns: 170px 116px 76px 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 20px;
}

.grid-labels {
  padding-block: 9px;
  background: #f9fafb;
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
}

.grid-labels .num, .sys-row .num { text-align: right; }

.group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.group .material-symbols-outlined { font-size: 17px; color: var(--text-mute); }

.sys-row { border-top: 1px solid #f3f4f6; color: inherit; text-decoration: none; transition: background-color .12s; }
.sys-row:hover { background: #f8fafc; }
.sys-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; }
.sys-name .material-symbols-outlined { color: #9ca3af; font-size: 18px; }
.sys-row:hover .sys-name .material-symbols-outlined { color: var(--brand); }
.sys-row[data-state="DOWN"] { background: #fff7f7; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 2px 10px 2px 7px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.pill .material-symbols-outlined { font-size: 16px; }
.pill[data-state="UP"] { background: var(--ok-tint); color: var(--ok-deep); }
.pill[data-state="UNSTABLE"] { background: var(--warn-tint); color: var(--warn-deep); }
.pill[data-state="DOWN"] { background: var(--danger-tint); color: var(--danger-deep); }
.pill[data-state="PENDING"] { background: #f3f4f6; color: var(--text-soft); }

.cells { display: grid; grid-template-columns: repeat(48, minmax(0, 1fr)); gap: 2px; height: 26px; }
.cell { border-radius: 2px; background: #f3f4f6; }

.scale { display: flex; justify-content: space-between; color: var(--text-mute); font-size: 12px; }
.scale-row { border-top: 1px solid var(--line); padding-block: 8px; }
.scale-row .scale { grid-column: 5; }

/* Quedas */
.feed li { position: relative; padding: 0 0 16px 24px; }
.feed li:last-child { padding-bottom: 0; }
.feed li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-mute);
}
.feed li.open::before { background: var(--danger); }
.feed li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 21px;
  bottom: -3px;
  width: 2px;
  background: var(--line);
}
.feed-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.feed-top a { font-weight: 600; text-underline-offset: 3px; }
.feed-when { color: var(--text-mute); font-size: 13px; }
.feed-cause { color: var(--text-soft); font-size: 14px; }

.empty { display: flex; align-items: center; gap: 10px; color: var(--text-soft); }
.empty .material-symbols-outlined { color: var(--ok); }

.more { display: inline-block; margin-top: 14px; color: var(--brand); font-size: 14px; font-weight: 600; text-underline-offset: 3px; }

/* HTTPS */
.cert { padding: 7px 0; }
.cert-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.cert-top b { font-weight: 600; }
.cert-bar { height: 6px; margin-top: 6px; border-radius: 99px; background: #f3f4f6; }
.cert-bar span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.cert[data-soon="true"] .cert-bar span { background: var(--danger); }
.cert[data-soon="true"] .cert-top span { color: var(--danger-deep); font-weight: 600; }

/* Página do sistema */
.crumbs { display: flex; align-items: center; gap: 4px; color: var(--text-mute); font-size: 14px; }
.crumbs a { color: var(--brand); text-underline-offset: 3px; }
.crumbs .material-symbols-outlined { font-size: 16px; }

.sys-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.sys-head h1 { font: 700 30px/1.15 var(--heading); letter-spacing: -.02em; }
.sys-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sys-meta { margin-top: 2px; color: var(--text-mute); font-size: 14px; }

.alert {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #f8b4b4;
  border-radius: 8px;
  background: var(--danger-tint);
  color: var(--danger-deep);
  font-weight: 500;
}

.alert[data-state="UNSTABLE"] { border-color: #faca15; background: var(--warn-tint); color: var(--warn-deep); }

.chart { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart text { fill: var(--text-mute); font: 12px var(--body); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--brand); opacity: .08; }
.chart .fail { fill: var(--danger); opacity: .16; }
.chart .cross { stroke: var(--text-mute); stroke-width: 1; }
.chart .mark { fill: var(--brand); stroke: #fff; stroke-width: 2; }

.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; max-width: 340px; margin: 0 auto; }
.calendar-week { color: var(--text-mute); font-size: 12px; font-weight: 600; text-align: center; }
.day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 6px;
  background: #f3f4f6;
  color: var(--text-mute);
  font-size: 13px;
  font-weight: 500;
}
.day.ok, .day.some { color: var(--text); }
.day.bad { color: #fff; }
.day.blank { background: transparent; }
.calendar + .legend { justify-content: center; margin-top: 14px; }

/* Histórico */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.filter[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-deep); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 9px 20px;
  background: #f9fafb;
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  text-align: left;
  white-space: nowrap;
}
td { padding: 12px 20px; border-top: 1px solid #f3f4f6; }
td a { font-weight: 600; text-underline-offset: 3px; }
td.nowrap { white-space: nowrap; }

.page-title h1 { font: 700 28px/1.2 var(--heading); letter-spacing: -.02em; }
.page-title p { color: var(--text-mute); }

.banner { padding: 10px 14px; border-radius: 8px; background: var(--danger-tint); color: var(--danger-deep); font-weight: 500; }

.tip {
  position: fixed;
  z-index: 50;
  max-width: 240px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
  font-size: 12.5px;
  pointer-events: none;
}

/* Automações */
.auto-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px 24px; align-items: center; padding: 8px 20px 12px; }

.job {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: inherit;
  text-decoration: none;
}

.job + .job { border-top: 1px solid #f3f4f6; }
.job-icon { --tone: var(--brand); --tone-bg: var(--brand-tint); }
.job-text { display: grid; flex: 1; min-width: 0; }
.job-text b { font-weight: 600; }
.job-text span { color: var(--text-mute); font-size: 13px; }

.auto-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.auto-counts dd { font: 700 24px/1.1 var(--heading); letter-spacing: -.02em; }
.auto-counts dd.alert-value { color: var(--danger-deep); }
.auto-counts dt { color: var(--text-mute); font-size: 13px; line-height: 1.3; }

.more-inline { margin-top: 0; }

.job-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.job-card { padding: 18px 20px; }
.job-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.job-card-head h2 { flex: 1; min-width: 0; font: 600 17px/1.3 var(--heading); letter-spacing: -.01em; }
.job-last { font-size: 14px; }
.problem-text { margin-top: 6px; color: var(--danger-deep); font-size: 14px; font-weight: 500; }
.job-card .panel-note { margin-top: 6px; }

.empty-info { display: flex; align-items: center; gap: 10px; color: var(--text-soft); }
.empty-info .material-symbols-outlined { color: var(--brand); }

/* Entrada */
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }

.login-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 48px clamp(32px, 7vw, 96px);
  background: var(--navy);
  color: #fff;
}

.login-side h1 { max-width: 15em; font: 700 clamp(30px, 3.8vw, 44px)/1.12 var(--heading); letter-spacing: -.02em; }
.login-side p { max-width: 30em; color: var(--navy-soft); }

.login-form { display: grid; place-items: center; padding: 32px; }
.login-form form { width: min(360px, 100%); }
.login-form h2 { margin-bottom: 22px; font: 600 24px/1.2 var(--heading); }
.login-form label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.login-form input[type="password"] {
  width: 100%;
  min-height: 44px;
  margin-bottom: 14px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}
.form-error { margin: -4px 0 14px; color: var(--danger-deep); font-size: 14px; font-weight: 500; }

/* Alertas */
.btn-small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn-quiet { border-color: transparent; color: var(--text-soft); }
.btn-quiet:hover { background: var(--danger-tint); color: var(--danger-deep); }

.notice {
  padding: 10px 14px;
  border: 1px solid #84e1bc;
  border-radius: 8px;
  background: var(--ok-tint);
  color: var(--ok-deep);
  font-weight: 500;
}
.notice[data-tone="danger"] { border-color: #f8b4b4; background: var(--danger-tint); color: var(--danger-deep); }
.notice[data-tone="info"] { border-color: #a4cafe; background: var(--brand-tint); color: var(--brand-deep); }

.rcp-status { padding-bottom: 0; }
.rcp-status:has(.notice[hidden]) { display: none; }
.rcp-summary { margin-bottom: 8px; }
.rcp-list li + li { border-top: 1px solid #f3f4f6; }
.rcp { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.rcp-icon { flex: none; background: var(--brand-tint); color: var(--brand); }
.rcp-icon[data-channel="WHATSAPP"] { background: var(--ok-tint); color: var(--ok); }
.rcp-text { display: grid; min-width: 0; flex: 1; }
.rcp-text b { font-weight: 600; }
.rcp-text span { overflow: hidden; color: var(--text-mute); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rcp-actions { display: flex; flex: none; gap: 4px; }

.rcp-form { display: grid; gap: 16px; }
.field label, .seg legend { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.field input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f9fafb;
}
.field input:focus { border-color: var(--brand); background: var(--surface); outline: 3px solid var(--brand-tint); outline-offset: 0; }
.field-hint { margin-top: 6px; color: var(--text-mute); font-size: 13px; }
.field-hint a { color: var(--brand); font-weight: 600; }

.seg { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; border: 0; }
.seg legend { grid-column: 1 / -1; padding: 0; }
.seg-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.seg-option:first-of-type { border-radius: 8px 0 0 8px; }
.seg-option:last-of-type { border-left: 0; border-radius: 0 8px 8px 0; }
.seg-option input { position: absolute; opacity: 0; pointer-events: none; }
.seg-option:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-deep); }
.seg-option:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }

@media (max-width: 1160px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .auto-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hosts { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
}

@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: sticky; z-index: 20; height: auto; flex-direction: row; align-items: center; box-shadow: 0 1px 0 var(--line); }
  .brand { padding: 10px 12px; border: 0; }
  .brand-text { display: none; }
  .side-nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
  .side-title { display: none; }
  .side-item { width: auto; white-space: nowrap; }
  .side-item[aria-current="page"]::before { display: none; }
  .side-foot { padding: 8px; border: 0; }
  .side-foot span:last-child { display: none; }
  .main { padding: 14px 14px 32px; }
  .hero { padding: 22px 20px 26px; }

  .grid-labels, .scale-row { display: none; }
  .grid-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .sys-row .cells { grid-column: 1 / -1; order: 5; }
  .sys-row .num { display: none; }

  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .login-side { padding: 32px 24px; }
}

@media (max-width: 520px) {
  .kpis, .job-cards { grid-template-columns: minmax(0, 1fr); }
  .rcp { flex-wrap: wrap; }
  .rcp-actions { width: 100%; padding-left: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
