@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #050b18;
  --bg-soft: #081120;
  --sidebar: #060d1a;
  --panel: rgba(10, 22, 39, .9);
  --panel-strong: #0c192b;
  --panel-hover: #10223a;
  --border: rgba(133, 164, 204, .17);
  --border-strong: rgba(88, 179, 255, .31);
  --text: #f3f7ff;
  --muted: #8292aa;
  --muted-light: #b2bed0;
  --cyan: #22c7ff;
  --blue: #3979ff;
  --violet: #9a64ff;
  --green: #28dc8e;
  --amber: #f8b84e;
  --red: #ff667d;
  --cyan-soft: rgba(34, 199, 255, .12);
  --green-soft: rgba(40, 220, 142, .11);
  --violet-soft: rgba(154, 100, 255, .12);
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .2);
  font-family: "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(5, 11, 24, .96), rgba(5, 11, 24, .98)),
    url("https://havendevelopment.net/storage/theme-editor/01KNSB9M1WVGN1BA3M8G0BH2KF.png") center top / cover fixed,
    var(--bg);
  color: var(--text);
}

button, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  border-radius: 8px;
  background: var(--cyan);
  color: #02111b;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.demo-banner {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  height: 34px;
  border-bottom: 1px solid rgba(34, 199, 255, .2);
  background: linear-gradient(90deg, rgba(28, 92, 212, .95), rgba(91, 62, 194, .95));
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.demo-banner span:last-child { font-weight: 500; opacity: .75; }
.demo-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; }

.app-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; padding-top: 34px; }
.sidebar {
  position: fixed;
  z-index: 50;
  inset: 34px auto 0 0;
  display: flex;
  width: 238px;
  padding: 1.25rem 1rem 1rem;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(5, 12, 25, .93);
  backdrop-filter: blur(20px);
}
.brand { display: flex; min-height: 54px; align-items: center; padding: .2rem .55rem 1.2rem; }
.brand img { display: block; width: 168px; max-height: 45px; object-fit: contain; object-position: left center; }
.nav-list { display: grid; gap: .25rem; }
.nav-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 43px;
  padding: 0 .72rem;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  outline: none;
  background: transparent;
  color: var(--muted-light);
  cursor: pointer;
  font-size: .86rem;
  text-align: left;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.nav-item:hover, .nav-item:focus-visible { border-color: var(--border); background: rgba(255, 255, 255, .025); color: var(--text); }
.nav-item.active { border-color: rgba(34, 199, 255, .16); background: linear-gradient(90deg, rgba(34, 199, 255, .14), rgba(56, 120, 255, .07)); color: #eafeff; }
.nav-icon { color: var(--cyan); font-size: 1.05rem; text-align: center; }
.nav-count { min-width: 23px; padding: .1rem .34rem; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--muted-light); font-size: .66rem; text-align: center; }
.nav-count.warning { background: rgba(248, 184, 78, .12); color: var(--amber); }
.sidebar-divider { height: 1px; margin: 1rem .55rem; background: var(--border); }
.nav-label { margin: 0 .75rem .45rem; color: #53647b; font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.secondary .nav-icon { color: #6f82a0; }
.sidebar-status {
  display: grid;
  gap: .55rem;
  margin-top: auto;
  padding: .9rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(14, 31, 51, .9), rgba(8, 19, 34, .85));
  font-size: .72rem;
}
.status-heading { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.sidebar-status strong { color: #8bf0bc; font-size: .73rem; }
.sidebar-status > span { color: var(--muted); }
.sidebar-status a { color: var(--cyan); text-decoration: none; }
.live-dot, .health-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(40, 220, 142, .1), 0 0 12px rgba(40, 220, 142, .5); }
.health-dot { width: 6px; height: 6px; margin-right: .25rem; }

.workspace { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  z-index: 40;
  top: 34px;
  display: flex;
  min-height: 77px;
  padding: .85rem clamp(1rem, 2.2vw, 2rem);
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 11, 24, .83);
  backdrop-filter: blur(18px);
}
.title-block { min-width: 0; }
.eyebrow, .card-kicker { display: block; margin-bottom: .18rem; color: var(--cyan); font-size: .61rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Space Grotesk", "DM Sans", sans-serif; }
h1 { margin-bottom: 0; font-size: clamp(1.15rem, 2vw, 1.45rem); letter-spacing: -.02em; }
.topbar-actions { display: flex; margin-left: auto; align-items: center; gap: .55rem; }
.live-control { display: flex; align-items: center; gap: .45rem; margin-right: .25rem; color: #95a7bf; font-size: .72rem; }
.range-control select, .icon-button, .avatar-button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: rgba(12, 25, 43, .8);
  color: var(--muted-light);
}
.range-control select { min-width: 132px; padding: 0 2rem 0 .72rem; cursor: pointer; }
.range-control select:focus-visible, .icon-button:focus-visible, .avatar-button:focus-visible { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.icon-button { display: grid; width: 38px; padding: 0; place-items: center; cursor: pointer; font-size: 1.15rem; }
.icon-button:hover { border-color: var(--border-strong); color: var(--cyan); }
.avatar-button { width: 38px; padding: 0; border-radius: 50%; background: linear-gradient(145deg, #285dd5, #6845cc); color: white; cursor: pointer; font-size: .7rem; font-weight: 700; }
.menu-toggle { display: none; }

.dashboard { display: grid; gap: 1rem; width: min(1680px, 100%); margin: 0 auto; padding: clamp(1rem, 2.2vw, 2rem); }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(13, 28, 48, .92), rgba(8, 19, 34, .9)); box-shadow: var(--shadow); }
.health-strip { display: grid; grid-template-columns: minmax(270px, 1.8fr) repeat(4, minmax(100px, .65fr)); min-height: 92px; align-items: stretch; overflow: hidden; }
.health-main { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.2rem; }
.health-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 2px solid var(--green); border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; box-shadow: 0 0 22px rgba(40, 220, 142, .1); }
.health-main h2 { margin-bottom: .2rem; font-size: .95rem; }
.health-main p { margin-bottom: 0; color: var(--muted); font-size: .73rem; }
.health-stat { display: grid; padding: 1rem; place-content: center; border-left: 1px solid var(--border); text-align: center; }
.health-stat strong { font-family: "Space Grotesk", sans-serif; font-size: 1.4rem; }
.health-stat span { color: var(--muted); font-size: .66rem; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.metric-card { position: relative; min-height: 190px; padding: 1rem 1.05rem .75rem; overflow: hidden; }
.metric-card::after { position: absolute; content: ""; inset: auto -15% -70% 20%; height: 130px; border-radius: 50%; background: rgba(34, 199, 255, .08); filter: blur(28px); pointer-events: none; }
.metric-card[data-accent="violet"]::after { background: rgba(154, 100, 255, .09); }
.metric-heading { display: flex; align-items: center; justify-content: space-between; }
.metric-icon { color: var(--muted-light); font-family: "Space Grotesk", sans-serif; font-size: .73rem; font-weight: 700; letter-spacing: .08em; }
.trend { padding: .17rem .4rem; border-radius: 999px; font-size: .61rem; font-weight: 700; }
.trend.positive { background: var(--green-soft); color: var(--green); }
.trend.negative { background: rgba(255, 102, 125, .1); color: #ff8c9e; }
.trend.neutral { background: rgba(255, 255, 255, .05); color: var(--muted); }
.trend.large { position: absolute; right: 1rem; bottom: 1rem; }
.metric-value { display: flex; margin-top: 1rem; align-items: baseline; gap: .45rem; }
.metric-value strong { font-family: "Space Grotesk", sans-serif; font-size: clamp(1.65rem, 2.5vw, 2.1rem); letter-spacing: -.04em; }
.metric-value span { color: var(--muted); font-size: .67rem; }
.capacity-bar { height: 4px; margin-top: .72rem; overflow: hidden; border-radius: 999px; background: rgba(137, 165, 202, .13); }
.capacity-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: 0 0 10px rgba(34, 199, 255, .35); transition: width .4s ease; }
.capacity-bar.violet > span { background: linear-gradient(90deg, #7451e5, var(--violet)); box-shadow: 0 0 10px rgba(154, 100, 255, .35); }
.capacity-bar.blue > span { background: linear-gradient(90deg, #3564f0, #5a8aff); }
.sparkline { position: relative; z-index: 1; display: block; width: 100%; height: 48px; margin-top: .85rem; overflow: visible; }
.line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.line.cyan { stroke: var(--cyan); }
.line.violet { stroke: var(--violet); }
.line.blue { stroke: var(--blue); }
.line.green { stroke: var(--green); }
.line.faint { opacity: .7; }
.metric-foot { display: flex; margin-top: 1rem; justify-content: space-between; color: var(--muted); font-size: .62rem; }
.metric-foot strong { color: var(--muted-light); }
.network-values { display: grid; grid-template-columns: 1fr 1fr; margin-top: 1rem; }
.network-values div { display: grid; }
.network-values div + div { padding-left: .8rem; border-left: 1px solid var(--border); }
.network-values strong { font-family: "Space Grotesk", sans-serif; font-size: 1.8rem; }
.network-values span { color: var(--muted); font-size: .67rem; }
.network-spark { margin-top: .55rem; }

.chart-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1rem; }
.chart-card { min-width: 0; padding: 1rem; }
.card-header { display: flex; min-height: 42px; align-items: start; justify-content: space-between; gap: .8rem; }
.card-header.compact { min-height: 36px; }
.card-header h2, .card-header h3 { margin-bottom: 0; font-size: .92rem; }
.legend { display: flex; flex-wrap: wrap; justify-content: end; gap: .75rem; color: var(--muted); font-size: .62rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: 8px; height: 3px; border-radius: 999px; }
.cyan-bg { background: var(--cyan); }
.violet-bg { background: var(--violet); }
.green-bg { background: var(--green); }
.blue-bg { background: var(--blue); }
.chart { min-height: 230px; margin-top: .35rem; }
.chart svg { display: block; width: 100%; height: 230px; overflow: visible; }
.chart-grid { stroke: rgba(137, 165, 202, .1); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-axis { fill: #5d6c81; font-family: "DM Sans", sans-serif; font-size: 9px; }
.chart-area-cyan { fill: url(#cyanGradient); }
.chart-area-violet { fill: url(#violetGradient); }
.chart-area-green { fill: url(#greenGradient); }
.chart-path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-summary { display: flex; margin-top: .35rem; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .64rem; }
.chart-summary strong { color: var(--muted-light); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .55fr); gap: 1rem; align-items: start; }
.services-card { min-width: 0; overflow: hidden; }
.services-card > .card-header { padding: 1rem 1rem .75rem; }
.text-button { padding: .35rem; border: 0; outline: none; background: transparent; color: var(--cyan); cursor: pointer; font-size: .68rem; font-weight: 700; }
.text-button:hover, .text-button:focus-visible { text-decoration: underline; text-underline-offset: .25rem; }
.text-button.full { width: 100%; padding: .9rem; text-align: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .71rem; }
th { padding: .65rem .9rem; border-block: 1px solid var(--border); background: rgba(255, 255, 255, .018); color: #66768c; font-size: .59rem; font-weight: 700; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
td { padding: .68rem .9rem; border-bottom: 1px solid rgba(133, 164, 204, .1); color: var(--muted-light); white-space: nowrap; }
tbody tr { cursor: pointer; transition: background .15s ease; }
tbody tr:hover, tbody tr:focus-within { background: rgba(34, 199, 255, .035); }
tbody tr:last-child td { border-bottom: 0; }
.service-name { display: flex; align-items: center; gap: .62rem; color: var(--text); font-weight: 600; }
.service-icon { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(34, 199, 255, .2); border-radius: 7px; background: linear-gradient(145deg, rgba(34, 199, 255, .15), rgba(57, 121, 255, .08)); color: var(--cyan); font-family: "Space Grotesk", sans-serif; font-size: .7rem; font-weight: 700; }
.status-cell { color: var(--green); }
.status-cell i { display: inline-block; width: 6px; height: 6px; margin-right: .35rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px rgba(40, 220, 142, .5); }
.usage-cell { min-width: 100px; }
.usage-value { display: flex; align-items: center; gap: .45rem; }
.usage-value > span { width: 36px; }
.usage-track { width: 48px; height: 3px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.usage-track i { display: block; height: 100%; border-radius: inherit; background: var(--cyan); }
.row-action { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--border); border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.row-action:hover, .row-action:focus-visible { border-color: var(--cyan); color: var(--cyan); }
.uptime { color: var(--green); }

.right-column { display: grid; gap: 1rem; }
.region-card, .alerts-card { padding: 1rem; }
.pill { display: inline-flex; width: max-content; padding: .18rem .47rem; align-items: center; border-radius: 999px; font-size: .58rem; font-weight: 700; }
.pill.good { border: 1px solid rgba(40, 220, 142, .2); background: var(--green-soft); color: var(--green); }
.pill.warning { border: 1px solid rgba(248, 184, 78, .25); background: rgba(248, 184, 78, .09); color: var(--amber); }
.pill.standalone { margin-top: auto; }
.region-map { position: relative; height: 94px; margin: .6rem 0; overflow: hidden; border: 1px solid rgba(34, 199, 255, .08); border-radius: 8px; background: radial-gradient(ellipse at center, rgba(31, 84, 135, .25), transparent 65%), #081422; }
.map-grid { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(34, 199, 255, .18) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 199, 255, .18) 1px, transparent 1px); background-size: 22px 22px; transform: perspective(160px) rotateX(45deg) scale(1.5); }
.map-point { position: absolute; width: 6px; height: 6px; border: 1px solid #caffeb; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(40, 220, 142, .12), 0 0 14px var(--green); }
.p1 { left: 17%; top: 42%; }.p2 { left: 25%; top: 30%; }.p3 { left: 53%; top: 30%; }.p4 { left: 58%; top: 42%; }.p5 { left: 84%; top: 62%; }
.region-list { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; }
.region-list li { display: flex; padding: .35rem .15rem; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(133, 164, 204, .08); color: var(--muted); font-size: .65rem; }
.region-list li:last-child { border-bottom: 0; }
.region-list li span { display: flex; align-items: center; gap: .4rem; color: var(--muted-light); }
.region-list i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.alert { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: .55rem; margin-top: .65rem; padding: .7rem; align-items: start; border: 1px solid var(--border); border-radius: 9px; background: rgba(0, 0, 0, .1); }
.warning-alert { border-color: rgba(248, 184, 78, .25); background: rgba(248, 184, 78, .035); }
.alert-icon { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: rgba(248, 184, 78, .1); color: var(--amber); font-weight: 700; }
.info-alert .alert-icon { background: var(--cyan-soft); color: var(--cyan); }
.alert strong { display: block; font-size: .68rem; }
.alert p { margin: .18rem 0 0; color: var(--muted); font-size: .58rem; }
.alert time { color: var(--muted); font-size: .57rem; }

.detail-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.mini-stat { position: relative; display: flex; min-height: 145px; padding: 1rem; flex-direction: column; overflow: hidden; }
.mini-stat > span:first-child { color: var(--muted); font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.mini-stat > strong { margin-top: .45rem; font-family: "Space Grotesk", sans-serif; font-size: 1.55rem; }
.mini-stat > small { color: var(--muted); font-size: .58rem; }
.mini-bars { position: absolute; right: 1rem; bottom: 1rem; display: flex; height: 42px; align-items: end; gap: 3px; }
.mini-bars i { width: 4px; min-height: 5px; border-radius: 2px; background: linear-gradient(var(--cyan), var(--blue)); }
.donut { position: absolute; right: 1rem; bottom: 1rem; display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: conic-gradient(var(--violet) calc(var(--value) * 1%), rgba(255, 255, 255, .07) 0); }
.donut::before { position: absolute; content: ""; width: 40px; height: 40px; border-radius: 50%; background: var(--panel-strong); }
.donut span { z-index: 1; font-size: .58rem; font-weight: 700; }
.thermometer { height: 5px; margin-top: auto; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.thermometer span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--amber)); }

.dashboard-footer { display: flex; padding: 0 clamp(1rem, 2.2vw, 2rem) 1.5rem; justify-content: space-between; gap: 1rem; color: #54647b; font-size: .6rem; }

.service-dialog { width: min(1120px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); padding: 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 16px; background: #071222; color: var(--text); box-shadow: 0 32px 100px rgba(0, 0, 0, .62); }
.service-dialog::backdrop { background: rgba(1, 5, 12, .78); backdrop-filter: blur(7px); }
.dialog-shell { max-height: calc(100vh - 2rem); overflow-y: auto; }
.dialog-header { position: sticky; z-index: 2; top: 0; display: flex; padding: 1rem 1.2rem; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: rgba(7, 18, 34, .94); backdrop-filter: blur(14px); }
.dialog-title, .dialog-actions { display: flex; align-items: center; gap: .75rem; }
.dialog-title .service-icon { width: 40px; height: 40px; }
.dialog-title h2 { margin-bottom: 0; font-size: 1.12rem; }
.dialog-meta { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); }
.dialog-meta div { display: grid; gap: .22rem; padding: .8rem 1.2rem; border-right: 1px solid var(--border); }
.dialog-meta div:last-child { border-right: 0; }
.dialog-meta span { color: var(--muted); font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; }
.dialog-meta strong { font-size: .72rem; }
.dialog-tabs { display: flex; gap: .25rem; padding: .7rem 1rem 0; border-bottom: 1px solid var(--border); }
.dialog-tabs button { padding: .55rem .8rem .7rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: .68rem; }
.dialog-tabs button.active { border-bottom-color: var(--cyan); color: var(--cyan); }
.dialog-content { display: grid; gap: 1rem; padding: 1rem; }
.dialog-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.dialog-metrics article { display: grid; gap: .4rem; padding: .85rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(12, 27, 47, .8); }
.dialog-metrics article > span { color: var(--muted); font-size: .62rem; }
.dialog-metrics article > strong { font-family: "Space Grotesk", sans-serif; font-size: 1.15rem; }
.dialog-metrics small { color: var(--muted); font-size: .58rem; }
.dialog-chart-panel, .events-panel { padding: 1rem; border: 1px solid var(--border); border-radius: 11px; background: rgba(10, 23, 41, .7); }
.dialog-chart { min-height: 205px; }
.dialog-chart svg { height: 205px; }
.event-list { display: grid; margin: .5rem 0 0; padding: 0; list-style: none; }
.event-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: .55rem; padding: .65rem 0; align-items: start; border-bottom: 1px solid var(--border); }
.event-list li:last-child { border-bottom: 0; }
.event-dot { width: 8px; height: 8px; margin-top: .2rem; border-radius: 50%; }
.event-dot.success { background: var(--green); box-shadow: 0 0 8px rgba(40, 220, 142, .4); }
.event-dot.info { background: var(--cyan); }
.event-list strong { display: block; font-size: .69rem; }
.event-list p { margin: .12rem 0 0; color: var(--muted); font-size: .58rem; }
.event-list time { color: var(--muted); font-size: .58rem; }

.toast { position: fixed; z-index: 200; right: 1rem; bottom: 1rem; max-width: min(340px, calc(100% - 2rem)); padding: .75rem 1rem; border: 1px solid rgba(34, 199, 255, .25); border-radius: 10px; background: #10233a; color: var(--text); box-shadow: var(--shadow); font-size: .72rem; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1280px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .health-strip { grid-template-columns: minmax(250px, 1.6fr) repeat(4, minmax(88px, .6fr)); }
  th:nth-child(4), td:nth-child(4) { display: none; }
}

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { width: 76px; padding-inline: .65rem; }
  .brand { padding-inline: 0; justify-content: center; overflow: hidden; }
  .brand img { width: 44px; max-width: none; object-position: left; }
  .nav-item { grid-template-columns: 1fr; padding: 0; justify-items: center; }
  .nav-item > span:not(.nav-icon) { display: none; }
  .nav-label, .sidebar-status { display: none; }
  .sidebar-divider { margin-inline: .2rem; }
  .workspace { grid-column: 2; }
  .content-grid { grid-template-columns: 1fr; }
  .right-column { grid-template-columns: 1fr 1fr; }
  .health-strip { grid-template-columns: 1.7fr repeat(2, .7fr); }
  .health-stat:nth-last-child(-n+2) { display: none; }
}

@media (max-width: 760px) {
  .demo-banner span:last-child { display: none; }
  .app-shell { display: block; }
  .sidebar { width: min(280px, 86vw); transform: translateX(-102%); transition: transform .22s ease; box-shadow: 24px 0 70px rgba(0, 0, 0, .5); }
  .sidebar.open { transform: translateX(0); }
  .brand { padding-inline: .55rem; justify-content: start; }
  .brand img { width: 168px; max-width: 100%; }
  .nav-item { grid-template-columns: 28px minmax(0, 1fr) auto; padding: 0 .72rem; justify-items: initial; }
  .nav-item > span:not(.nav-icon) { display: block; }
  .nav-label, .sidebar-status { display: initial; }
  .sidebar-status { display: grid; }
  .workspace { width: 100%; }
  .menu-toggle { display: grid; }
  .live-control, .avatar-button { display: none; }
  .range-control select { min-width: 105px; width: 105px; }
  .dashboard { padding: 1rem; }
  .health-strip { grid-template-columns: 1fr 1fr; }
  .health-main { grid-column: 1 / -1; border-bottom: 1px solid var(--border); }
  .health-stat { border-left: 0; }
  .health-stat + .health-stat { border-left: 1px solid var(--border); }
  .metric-grid, .chart-layout, .right-column { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-meta, .dialog-metrics { grid-template-columns: repeat(2, 1fr); }
  .dialog-meta div:nth-child(2) { border-right: 0; }
  .dialog-meta div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .dialog-tabs { overflow-x: auto; }
  .dashboard-footer { flex-direction: column; }
  th:nth-child(3), td:nth-child(3), th:nth-child(5), td:nth-child(5) { display: none; }
}

@media (max-width: 480px) {
  .topbar { min-height: 68px; padding-inline: .75rem; }
  .title-block .eyebrow { display: none; }
  .topbar-actions { gap: .3rem; }
  .range-control select { width: 94px; min-width: 94px; font-size: .66rem; }
  .health-strip { grid-template-columns: 1fr; }
  .health-stat { min-height: 68px; border-top: 1px solid var(--border); border-left: 0 !important; }
  .health-stat:nth-of-type(3) { display: none; }
  .metric-grid, .detail-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 180px; }
  .card-header { align-items: start; flex-direction: column; }
  .legend { justify-content: start; }
  .chart-summary { display: grid; grid-template-columns: 1fr 1fr; }
  .dialog-header { align-items: start; }
  .dialog-actions .pill { display: none; }
  .dialog-meta, .dialog-metrics { grid-template-columns: 1fr; }
  .dialog-meta div { border-right: 0; border-bottom: 1px solid var(--border); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
