:root {
  --bg: #070910;
  --bg-soft: #0b0e16;
  --panel: #10141e;
  --panel-2: #151a27;
  --panel-3: #1b2130;
  --border: #252c3c;
  --border-bright: #374258;
  --text: #f3f6fc;
  --muted: #8e99ad;
  --yellow: #ffd21c;
  --yellow-soft: #fff0a3;
  --cyan: #25c8ff;
  --violet: #9a6cff;
  --green: #35dfa0;
  --red: #ff5069;
  --orange: #ff934a;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 78% -10%, rgba(123, 76, 190, .19), transparent 34rem),
    radial-gradient(circle at 8% 100%, rgba(0, 162, 255, .09), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #0a0d14;
  color: var(--text);
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(37, 200, 255, .11);
  background: #0c1018;
}
textarea { min-height: 130px; resize: vertical; }
label {
  display: block;
  margin: 15px 0 6px;
  color: #c8cfdb;
  font-size: 12px;
  font-weight: 700;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
}

.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 34px;
}
.login-screen::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .016) 1px, transparent 1px);
  background-size: 54px 54px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.login-glow {
  position: absolute;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .12;
}
.login-glow-yellow { top: -18rem; left: -10rem; background: var(--yellow); }
.login-glow-blue { right: -16rem; bottom: -18rem; background: var(--cyan); }
.login-layout {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(40px, 8vw, 110px);
  align-items: center;
}
.login-brand { max-width: 560px; }
.login-logo {
  width: min(360px, 70%);
  display: block;
  margin: 18px 0 8px;
  border-radius: 26px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .5));
}
.login-brand h1 {
  margin: 4px 0 12px;
  max-width: 500px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: .96;
  letter-spacing: -.045em;
}
.login-brand > p {
  max-width: 520px;
  margin: 0 0 28px;
  color: #aab3c4;
  font-size: 17px;
}
.feature-line {
  display: flex;
  gap: 13px;
  align-items: center;
  max-width: 470px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: #d5dbe6;
  font-size: 13px;
}
.feature-line span {
  color: var(--yellow);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}
.login-card {
  width: 100%;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(22, 27, 40, .96), rgba(11, 14, 22, .97));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, .04);
  backdrop-filter: blur(20px);
}
.login-card-kicker {
  margin-bottom: 8px;
  color: var(--yellow);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2em;
}
.login-card h2 { margin: 0 0 4px; font-size: 26px; }
.login-card > p { margin: 0 0 20px; font-size: 13px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-card {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #0c1018;
  color: var(--text);
  text-align: left;
  transition: transform .2s, border-color .2s, background .2s;
}
.mode-card:hover { transform: translateY(-2px); border-color: var(--border-bright); }
.mode-card.active {
  border-color: rgba(255, 210, 28, .78);
  background: linear-gradient(145deg, rgba(255, 210, 28, .13), rgba(255, 210, 28, .025));
  box-shadow: inset 0 0 0 1px rgba(255, 210, 28, .08);
}
.mode-card strong, .mode-card small { display: block; }
.mode-card strong { margin: 7px 0 2px; }
.mode-card small { color: var(--muted); font-size: 11px; }
.mode-icon { font-size: 20px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 62px; }
.text-button {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
}
.primary, .secondary, .ghost, .danger {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 800;
  transition: transform .18s, filter .18s, border-color .18s;
}
.primary:hover, .secondary:hover, .ghost:hover, .danger:hover { transform: translateY(-1px); filter: brightness(1.07); }
.primary { background: linear-gradient(125deg, #ffc800, #ffe56c); color: #090b10; }
.secondary { border-color: #2c5872; background: #112536; color: var(--cyan); }
.ghost { border-color: var(--border); background: #111622; color: #dbe1ec; }
.danger { border-color: rgba(255, 80, 105, .35); background: rgba(255, 80, 105, .1); color: #ff8799; }
.small { min-height: 32px; padding: 6px 10px; border-radius: 9px; font-size: 11px; }
.login-submit { width: 100%; justify-content: space-between; margin-top: 20px; padding: 14px 17px; }
.form-message { min-height: 22px; padding-top: 8px; color: var(--red); font-size: 12px; }
.security-note {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(37, 200, 255, .12);
  border-radius: 12px;
  background: rgba(37, 200, 255, .035);
}
.security-note p { margin: 0; color: var(--muted); font-size: 11px; }

.portal { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
aside {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: 248px;
  display: flex;
  flex-direction: column;
  padding: 18px 15px;
  border-right: 1px solid var(--border);
  background: rgba(8, 11, 17, .97);
  backdrop-filter: blur(22px);
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 3px 5px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.side-brand img { width: 53px; height: 53px; border-radius: 13px; object-fit: cover; }
.side-brand strong, .side-brand small { display: block; }
.side-brand strong { letter-spacing: .16em; color: var(--yellow); }
.side-brand small { margin-top: 2px; color: var(--muted); font-size: 9px; }
aside nav { padding: 20px 0; }
.nav {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 4px 0;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #9ca6b8;
  text-align: left;
}
.nav span { text-align: center; color: #778299; }
.nav b { font-size: 13px; }
.nav em {
  min-width: 23px;
  padding: 3px 6px;
  border-radius: 99px;
  background: rgba(255, 80, 105, .13);
  color: #ff7d90;
  font-size: 9px;
  font-style: normal;
  text-align: center;
}
.nav:hover { background: rgba(255, 255, 255, .025); color: var(--text); }
.nav.active {
  border-color: rgba(37, 200, 255, .15);
  background: linear-gradient(90deg, rgba(37, 200, 255, .11), rgba(37, 200, 255, .025));
  color: var(--text);
}
.nav.active::before {
  position: absolute;
  left: -16px;
  width: 3px;
  height: 25px;
  border-radius: 0 4px 4px 0;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  content: "";
}
.nav.active span { color: var(--cyan); }
.side-status {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(53, 223, 160, .11);
  border-radius: 12px;
  background: rgba(53, 223, 160, .025);
}
.side-status i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}
.side-status strong, .side-status small { display: block; }
.side-status strong { font-size: 10px; }
.side-status small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.account {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  gap: 9px;
  align-items: center;
  margin-top: 10px;
  padding: 12px 7px 3px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 210, 28, .4);
  border-radius: 50%;
  background: rgba(255, 210, 28, .08);
  color: var(--yellow);
  font-weight: 900;
}
.account-copy { min-width: 0; }
.account-copy strong, .account-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-copy strong { font-size: 10px; }
.account-copy small { color: var(--muted); font-size: 9px; }
.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #111621;
  color: #cad1dd;
}
.icon-button:hover { border-color: var(--border-bright); color: var(--cyan); }

main {
  min-width: 0;
  grid-column: 2;
  padding: 28px clamp(20px, 3vw, 44px) 54px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}
.page-heading h2 { margin: 3px 0 1px; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.toolbar { display: flex; gap: 8px; align-items: center; }
.search-wrap { position: relative; width: min(310px, 31vw); }
.search-wrap span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-wrap input { padding-left: 35px; }
.toolbar select { width: 88px; }
.limited-banner {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 14px 17px;
  border: 1px solid rgba(255, 210, 28, .23);
  border-radius: 14px;
  background: rgba(255, 210, 28, .055);
}
.limited-banner > span { color: var(--yellow); font-size: 18px; }
.limited-banner strong { font-size: 12px; }
.limited-banner p { margin: 2px 0 0; color: #b8b19b; font-size: 11px; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--panel-2), #0d1119 72%);
}
.stat-card::after {
  position: absolute;
  top: -40px;
  right: -45px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: currentColor;
  opacity: .025;
  content: "";
}
.stat-icon {
  width: 39px;
  height: 39px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
}
.stat-card.yellow { color: var(--yellow); }
.stat-card.green { color: var(--green); }
.stat-card.red { color: var(--red); }
.stat-card.cyan { color: var(--cyan); }
.stat-value { display: block; color: var(--text); font-size: 27px; font-weight: 850; line-height: 1; }
.stat-label { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.content { min-height: 340px; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 24px 0 12px;
}
.section-head h3 { margin: 0; font-size: 16px; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: 14px; }
.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: linear-gradient(160deg, rgba(20, 25, 37, .93), rgba(12, 15, 23, .96));
}
.panel .section-head { margin: 0 0 14px; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 13px;
}
.filters select { width: auto; min-width: 150px; }
.filter-count { margin-left: auto; color: var(--muted); font-size: 10px; }
.host-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.host-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(150deg, #151a26, #0d1119);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.host-card:hover { transform: translateY(-2px); border-color: #374157; box-shadow: 0 15px 35px rgba(0, 0, 0, .2); }
.host-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cyan);
  content: "";
}
.host-card.disabled::before { background: var(--muted); }
.host-card.problem::before { background: var(--red); box-shadow: 0 0 14px rgba(255, 80, 105, .5); }
.host-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.host-card h4 {
  margin: 0;
  overflow: hidden;
  color: #f8faff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.host-address { margin-top: 4px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.favorite {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #657086;
  font-size: 18px;
}
.favorite.active { color: var(--yellow); text-shadow: 0 0 12px rgba(255, 210, 28, .3); }
.host-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 99px;
  background: #1b2230;
  color: #a8b1c1;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.pill.ok { background: rgba(53, 223, 160, .09); color: var(--green); }
.pill.bad { background: rgba(255, 80, 105, .1); color: var(--red); }
.pill.warn { background: rgba(255, 210, 28, .09); color: var(--yellow); }
.host-actions { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.host-actions small { max-width: 145px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.problem-list { display: grid; gap: 8px; }
.problem-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8, 11, 17, .55);
}
.severity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.severity-5 .severity-dot, .sev-5 { color: #ff3956; background-color: #ff3956; }
.severity-4 .severity-dot, .sev-4 { color: #ff714b; background-color: #ff714b; }
.severity-3 .severity-dot, .sev-3 { color: #ffa842; background-color: #ffa842; }
.severity-2 .severity-dot, .sev-2 { color: #ffe267; background-color: #ffe267; }
.severity-1 .severity-dot, .sev-1 { color: #56cfff; background-color: #56cfff; }
.problem-copy { min-width: 0; }
.problem-copy strong, .problem-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.problem-copy strong { font-size: 11px; }
.problem-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.problem-time { color: var(--muted); font-size: 9px; text-align: right; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 15px; }
.data-table { width: 100%; border-collapse: collapse; background: rgba(13, 16, 24, .88); }
.data-table th, .data-table td { padding: 12px 13px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #151a25;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.data-table td { font-size: 11px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .018); }
.cell-title { max-width: 480px; font-weight: 700; }
.cell-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.table-actions { display: flex; gap: 6px; }
.severity-label { background: transparent !important; font-size: 10px; font-weight: 800; }
.empty-state {
  min-height: 210px;
  display: grid;
  place-items: center;
  padding: 30px;
  border: 1px dashed var(--border);
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
}
.empty-state span { display: block; margin-bottom: 8px; color: #566176; font-size: 32px; }
.empty-state strong { display: block; color: #d5dbe5; }
.empty-state p { max-width: 430px; margin: 5px auto 0; font-size: 11px; }
.loading {
  min-height: 250px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border: 3px solid #212838;
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 4, 8, .8);
  backdrop-filter: blur(8px);
}
.modal-panel {
  position: relative;
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--border-bright);
  border-radius: 21px;
  background:
    radial-gradient(circle at 100% 0, rgba(99, 64, 163, .13), transparent 24rem),
    #10141e;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .55);
}
.modal-close {
  position: sticky;
  z-index: 3;
  top: 0;
  float: right;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #151a25;
  color: #cbd2df;
  font-size: 21px;
}
.modal h2 { margin: 4px 45px 4px 0; font-size: 24px; }
.modal-subtitle { margin: 0 0 20px; color: var(--muted); font-size: 11px; }
.host-modal-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: 18px 0; }
.metric-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0b0f17;
}
.metric-card.highlight { border-color: rgba(37, 200, 255, .2); background: linear-gradient(145deg, rgba(37, 200, 255, .06), #0b0f17); }
.metric-card small { display: block; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.metric-value { margin: 8px 0 12px; font-size: 24px; font-weight: 850; letter-spacing: -.035em; }
.metric-value span { color: var(--muted); font-size: 11px; font-weight: 500; }
.metric-foot { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: #667186; font-size: 9px; }
.disk-list { display: grid; gap: 8px; }
.disk-row {
  display: grid;
  grid-template-columns: minmax(70px, .4fr) 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b0f17;
}
.progress { height: 6px; overflow: hidden; border-radius: 99px; background: #222938; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.periods { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 12px; }
.periods button.active { border-color: var(--yellow); color: var(--yellow); }
.chart-wrap {
  min-height: 300px;
  padding: 14px 12px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #080b12;
}
.chart-svg { width: 100%; height: 270px; overflow: visible; }
.chart-grid-line { stroke: #252c3a; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-area { fill: url(#chartFill); opacity: .42; }
.chart-line { fill: none; stroke: var(--cyan); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.chart-minmax { fill: rgba(154, 108, 255, .1); stroke: rgba(154, 108, 255, .25); stroke-width: 1; }
.chart-axis { fill: #747f94; font-size: 10px; }
.chart-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.chart-stat { padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #0c1018; }
.chart-stat small, .chart-stat strong { display: block; }
.chart-stat small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.chart-stat strong { margin-top: 4px; font-size: 13px; }
.chart-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 9px; }
.custom-period { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.audit-json {
  max-width: 350px;
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toast {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  max-width: min(390px, calc(100vw - 44px));
  padding: 13px 17px;
  border: 1px solid rgba(53, 223, 160, .3);
  border-radius: 12px;
  background: #111922;
  box-shadow: var(--shadow);
  color: #dffbef;
  font-size: 12px;
}
.toast.error { border-color: rgba(255, 80, 105, .4); color: #ffdbe1; }
.mobile-only { display: none; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .login-layout { grid-template-columns: 1fr; max-width: 520px; }
  .login-brand { text-align: center; }
  .login-logo { width: 230px; margin: 12px auto 5px; }
  .login-brand h1 { font-size: 42px; }
  .login-brand > p, .feature-line { margin-left: auto; margin-right: auto; }
  .feature-line { text-align: left; }
  .portal { display: block; }
  aside { transform: translateX(-105%); transition: transform .24s ease; box-shadow: var(--shadow); }
  aside.open { transform: translateX(0); }
  main { padding: 20px 16px 42px; }
  .mobile-only { display: grid; }
  .topbar { align-items: flex-start; }
  .toolbar { align-self: center; }
  .search-wrap { width: 230px; }
}

@media (max-width: 620px) {
  .login-screen { padding: 18px; }
  .login-brand .feature-line { display: none; }
  .login-brand > p { font-size: 14px; }
  .login-card { border-radius: 20px; }
  .mode-card { min-height: 100px; padding: 11px; }
  .topbar { flex-wrap: wrap; gap: 13px; }
  .page-heading { flex: 1; }
  .toolbar { width: 100%; }
  .search-wrap { width: auto; flex: 1; }
  .stats { gap: 8px; }
  .stat-card { min-height: 92px; padding: 13px; }
  .stat-icon { width: 32px; height: 32px; }
  .stat-value { font-size: 22px; }
  .host-grid, .metric-grid { grid-template-columns: 1fr; }
  .filters select { flex: 1; min-width: 125px; }
  .filter-count { width: 100%; margin-left: 0; }
  .modal { padding: 8px; }
  .modal-panel { width: 100%; max-height: 96vh; padding: 17px; border-radius: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .chart-stats { grid-template-columns: repeat(2, 1fr); }
  .custom-period { grid-template-columns: 1fr; }
  .disk-row { grid-template-columns: 70px 1fr; }
  .disk-row .secondary { grid-column: 1 / -1; }
  .data-table th, .data-table td { padding: 10px; }
}
