:root {
  --ink: #172235;
  --muted: #6e7b8e;
  --line: #e4e8ee;
  --paper: #f5f7fa;
  --white: #fff;
  --nav: #101926;
  --nav2: #17263a;
  --teal: #13a89e;
  --blue: #346df1;
  --orange: #f39b37;
  --red: #d74e57;
  --shadow: 0 18px 55px rgba(19, 31, 49, 0.11);
  font-family:
    Inter,
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
button,
input,
select,
textarea {
  font: inherit;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px 1fr;
}
.sidebar {
  background: linear-gradient(180deg, var(--nav), #0b1320);
  color: #c7d0db;
  padding: 26px 17px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
  padding: 0 8px 30px;
}
.logo span,
.brand-mark {
  width: 41px;
  height: 41px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #38d7c8, #2372ee);
  font-weight: 850;
  letter-spacing: -1px;
  box-shadow: 0 7px 20px rgba(31, 164, 208, 0.28);
}
.logo strong {
  font-size: 17px;
  letter-spacing: -0.2px;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.nav-item {
  border: 0;
  background: transparent;
  color: #8f9daf;
  text-align: left;
  padding: 12px 14px;
  border-radius: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
}
.nav-item i {
  font-style: normal;
  width: 18px;
  text-align: center;
}
.nav-item:hover,
.nav-item.active {
  background: var(--nav2);
  color: #fff;
}
.nav-item.active {
  box-shadow: inset 3px 0 var(--teal);
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #263347;
  padding: 18px 9px 0;
  display: grid;
  gap: 12px;
}
.connection {
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot.online {
  background: #31c48d;
  box-shadow: 0 0 0 4px rgba(49, 196, 141, 0.12);
}
.dot.stale {
  background: var(--orange);
}
.dot.offline {
  background: var(--red);
}
.text-button {
  background: none;
  border: 0;
  color: #8492a5;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.workspace {
  padding: 34px 42px 70px;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--teal);
  margin: 0 0 7px;
}
.topbar h1 {
  font-size: 29px;
  letter-spacing: -0.04em;
  margin: 0;
}
.top-actions {
  display: flex;
  gap: 10px;
}
.primary,
.ghost,
.danger {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 750;
  cursor: pointer;
}
.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 7px 18px rgba(52, 109, 241, 0.22);
}
.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.danger {
  background: var(--red);
  color: #fff;
}
.wide {
  width: 100%;
  padding: 13px;
}
.primary:disabled,
.ghost:disabled,
.danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}
.stat,
.panel {
  background: #fff;
  border: 1px solid #e8ebf0;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(30, 44, 65, 0.04);
}
.stat {
  padding: 21px;
}
.stat-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.stat-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 12px 0 3px;
}
.stat-note {
  font-size: 12px;
  color: var(--muted);
}
.panel {
  padding: 0;
  overflow: hidden;
  margin-bottom: 20px;
}
.panel-head {
  padding: 19px 21px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-head h2 {
  font-size: 16px;
  margin: 0;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  color: #8490a0;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #fafbfc;
}
th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid #edf0f4;
  white-space: nowrap;
}
tbody tr {
  cursor: pointer;
}
tbody tr:hover {
  background: #f8fafc;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.alert-summary {
  min-width: 250px;
  white-space: normal;
  line-height: 1.55;
}
.alert-ack-button {
  padding: 7px 10px;
  font-size: 11px;
  white-space: nowrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f6;
  color: #566273;
  font-size: 11px;
  font-weight: 750;
}
.badge.good {
  background: #e8f8f2;
  color: #117858;
}
.badge.warn {
  background: #fff3e3;
  color: #a35b0a;
}
.badge.bad {
  background: #fdecef;
  color: #a82f3b;
}
.badge.info {
  background: #eaf0ff;
  color: #2756bc;
}
.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}
.muted {
  color: var(--muted);
}
.empty {
  padding: 42px;
  text-align: center;
  color: var(--muted);
}
.notice {
  padding: 12px 15px;
  border-radius: 10px;
  background: #e7f8f4;
  color: #126858;
  margin: -12px 0 20px;
}
.notice.error {
  background: #fdecef;
  color: #9c3039;
}
.loading {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}
.detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 20px;
  padding: 20px;
  font-size: 13px;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.modal {
  border: 0;
  border-radius: 19px;
  padding: 0;
  width: min(720px, calc(100vw - 32px));
  box-shadow: 0 30px 90px rgba(11, 20, 35, 0.28);
}
.modal.compact {
  width: min(580px, calc(100vw - 32px));
  padding: 25px;
}
.modal::backdrop {
  background: rgba(8, 16, 29, 0.58);
  backdrop-filter: blur(3px);
}
.modal form {
  padding: 25px;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 21px;
}
.modal h2 {
  margin: 0;
  font-size: 22px;
}
.icon-button {
  border: 0;
  background: #f2f4f7;
  border-radius: 9px;
  font-size: 22px;
  width: 34px;
  height: 34px;
  cursor: pointer;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-grid label,
.login-card label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #566273;
  font-weight: 700;
}
.span-2 {
  grid-column: 1/-1;
}
input,
select,
textarea {
  border: 1px solid #d9dee6;
  border-radius: 9px;
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #6a91ef;
  box-shadow: 0 0 0 3px rgba(52, 109, 241, 0.11);
}
textarea {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  resize: vertical;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}
.form-error {
  color: var(--red);
  min-height: 18px;
  font-size: 12px;
}
.secret-box {
  background: #111b2a;
  border-radius: 12px;
  padding: 15px;
  color: #d7fdf4;
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
}
.secret-box code {
  overflow-wrap: anywhere;
  word-break: break-all;
  flex: 1;
}
.security-note {
  font-size: 11px;
  color: #8994a2;
}
.auth-page {
  background: #0d1725;
  display: grid;
  place-items: center;
  padding: 30px;
}
.auth-shell {
  width: min(970px, 100%);
  min-height: 570px;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  background: #fff;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 35px 110px rgba(0, 0, 0, 0.35);
}
.brand-panel {
  padding: 66px;
  background:
    radial-gradient(
      circle at 85% 10%,
      rgba(44, 200, 187, 0.22),
      transparent 32%
    ),
    linear-gradient(145deg, #13243b, #0d1725);
  color: #fff;
  position: relative;
}
.brand-panel .brand-mark {
  margin-bottom: 75px;
}
.brand-panel h1 {
  font-size: 46px;
  line-height: 1.16;
  letter-spacing: -0.055em;
  margin: 0 0 22px;
}
.brand-panel .lead {
  color: #aeb9c8;
  line-height: 1.8;
  max-width: 400px;
}
.signal-line {
  position: absolute;
  bottom: 55px;
  left: 66px;
  right: 66px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.signal-line span {
  height: 2px;
  flex: 1;
  background: #2f4158;
}
.signal-line span:nth-child(2) {
  background: var(--teal);
  height: 5px;
}
.login-card {
  padding: 76px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card h2 {
  font-size: 27px;
  margin: 0 0 8px;
}
.login-card form {
  display: grid;
  gap: 17px;
  margin-top: 35px;
}
.login-card input {
  padding: 13px;
}
.login-card .security-note {
  text-align: center;
  margin-top: 22px;
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.metric-chart {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfe, #f2f6fa);
  padding: 16px 16px 8px;
  min-width: 0;
}
.metric-chart > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.metric-chart span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.metric-chart strong {
  font-size: 20px;
}
.spark {
  width: 100%;
  height: 130px;
  margin-top: 8px;
  overflow: visible;
}
.chart-axis {
  stroke: var(--line);
  stroke-width: 1;
}
.chart-empty {
  height: 138px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.range-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #edf1f5;
}
.range-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 8px;
}
.range-tabs button.active {
  color: var(--ink);
  background: var(--white);
}
.app-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.app-kpis article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
}
.app-kpis span,
.app-kpis strong {
  display: block;
}
.app-kpis span {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.app-kpis strong {
  font-size: 24px;
}
.app-detail h3 {
  margin: 0 0 12px;
  font-size: 14px;
}
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 78px 1fr;
  }
  .sidebar {
    padding: 23px 10px;
  }
  .logo strong,
  .nav-item:not(.active)::after,
  .nav-item {
    font-size: 0;
  }
  .logo {
    padding-left: 8px;
  }
  .nav-item {
    justify-content: center;
  }
  .nav-item i {
    font-size: 18px;
  }
  .sidebar-foot {
    display: none;
  }
  .workspace {
    padding: 25px 20px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .chart-grid,
  .app-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .brand-panel {
    display: none;
  }
}
@media (max-width: 600px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .chart-grid,
  .app-kpis {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .auth-page {
    padding: 15px;
  }
  .login-card {
    padding: 45px 28px;
  }
  .workspace {
    padding: 22px 14px;
  }
  .app-shell {
    grid-template-columns: 62px 1fr;
  }
  .sidebar {
    padding: 18px 6px;
  }
  .logo span {
    width: 38px;
    height: 38px;
  }
  .top-actions {
    width: 100%;
  }
  .top-actions button {
    flex: 1;
  }
}
