:root {
  --blue: #1966e6;
  --blue-dark: #104aaa;
  --green: #32a56a;
  --ink: #15262e;
  --ink-soft: #52656e;
  --surface: #f8fbfb;
  --canvas: #eef3f5;
  --line: #d6e0e3;
  --line-strong: #b9c8cd;
  --white: #fff;
  --danger: #b84242;
  --sidebar: #14262d;
  --sidebar-muted: #9fb1b8;
  --focus: #ffb238;
  --radius: 12px;
  font-family:
    Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.wordmark {
  width: max-content;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 720;
  letter-spacing: -0.065em;
  line-height: 1;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 20px);
  width: max-content;
}

.brand-mark {
  width: clamp(48px, 5vw, 64px);
  height: auto;
  flex: 0 0 auto;
}

.wordmark span {
  color: var(--blue);
}

.wordmark strong {
  color: var(--green);
  font-weight: inherit;
}

.login-view {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(420px, 0.85fr) minmax(460px, 1.15fr);
  background: var(--surface);
}

.login-panel {
  width: min(100%, 600px);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vh, 48px) clamp(32px, 6vw, 80px);
  animation: enter 520ms ease-out both;
}

.login-copy {
  margin: clamp(24px, 5vh, 52px) 0 clamp(20px, 3vh, 30px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.login-copy > p:last-child {
  max-width: 420px;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.84rem;
  font-weight: 680;
}

.field input {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 84px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 5px 6px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.field input:hover {
  border-color: #7f969e;
}

.field input:focus {
  background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgb(25 102 230 / 11%);
  outline: 0;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  font-weight: 720;
  cursor: pointer;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 18px;
  color: var(--white);
  background: var(--blue);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.primary-button:hover .button-arrow {
  transform: translateX(4px);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-arrow {
  font-size: 1.2rem;
  transition: transform 160ms ease;
}

.form-message {
  margin: -6px 0 0;
  color: var(--danger);
  font-size: 0.88rem;
  line-height: 1.45;
}

.login-note {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.login-atmosphere {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: clamp(44px, 7vw, 100px);
  color: var(--white);
  background:
    radial-gradient(circle at 65% 22%, rgb(68 181 126 / 38%), transparent 22%),
    linear-gradient(145deg, #113859 0%, #132c3b 47%, #102329 100%);
}

.login-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: linear-gradient(rgb(255 255 255 / 25%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 25%) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.login-atmosphere p {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(2.3rem, 5.5vw, 6.6rem);
  font-weight: 580;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.orbit {
  position: absolute;
  z-index: 1;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  animation: drift 9s ease-in-out infinite alternate;
}

.orbit-one {
  width: min(52vw, 760px);
  top: -16%;
  right: -18%;
}

.orbit-two {
  width: min(32vw, 470px);
  top: 13%;
  right: 2%;
  animation-delay: -3s;
}

.signal {
  position: absolute;
  z-index: 2;
  width: 12px;
  aspect-ratio: 1;
  background: var(--green);
  border: 4px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  box-shadow: 0 0 0 16px rgb(50 165 106 / 10%);
}

.signal-one {
  top: 24%;
  left: 28%;
}

.signal-two {
  top: 42%;
  right: 24%;
  background: #5f99ff;
  animation: pulse 2.4s ease-out infinite;
}

.app-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 30px 20px 24px;
  color: var(--white);
  background: var(--sidebar);
}

.sidebar-brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 10px 34px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.wordmark-small {
  font-size: 1.65rem;
}

.sidebar-brand > span {
  color: var(--sidebar-muted);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar nav {
  display: grid;
  gap: 6px;
  margin-top: 26px;
}

.nav-item {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: var(--sidebar-muted);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition:
    color 150ms ease,
    background 150ms ease;
}

.nav-item:hover {
  color: var(--white);
  background: rgb(255 255 255 / 6%);
}

.nav-item.is-active {
  color: var(--white);
  background: rgb(255 255 255 / 9%);
}

.nav-mark {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.55;
  transition: transform 180ms ease;
}

.nav-item.is-active .nav-mark {
  color: var(--green);
  opacity: 1;
  transform: scale(1.35);
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px 10px 0;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.sidebar-footer p {
  overflow: hidden;
  margin: 0 0 8px;
  color: var(--sidebar-muted);
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-button {
  padding: 0;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.workspace {
  min-width: 0;
}

.topbar {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px clamp(24px, 4vw, 64px);
  background: rgb(248 251 251 / 86%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 620;
  letter-spacing: -0.04em;
}

.environment {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.status-dot {
  width: 8px;
  aspect-ratio: 1;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(50 165 106 / 12%);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
}

.content {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 70px) clamp(24px, 4vw, 64px) 80px;
}

.content-status {
  min-height: 0;
}

.section-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 38px;
}

.section-intro h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2.15rem);
  font-weight: 570;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.section-intro p {
  max-width: 470px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.updated-at {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.metric {
  padding: 26px 22px;
  border-right: 1px solid var(--line);
}

.metric:first-child {
  padding-left: 0;
}

.metric:last-child {
  border-right: 0;
}

.metric-label {
  display: block;
  min-height: 34px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}

.metric-value {
  display: block;
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 560;
  letter-spacing: -0.06em;
}

.detail-block {
  margin-top: 52px;
}

.detail-block h3 {
  margin: 0 0 18px;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th {
  padding: 13px 14px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 740;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 17px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 140ms ease;
}

.data-table tbody tr:hover {
  background: rgb(255 255 255 / 58%);
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 0;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 0;
}

.primary-cell {
  max-width: 300px;
  font-weight: 680;
}

.secondary-cell {
  color: var(--ink-soft);
}

.mono-cell {
  max-width: 250px;
  overflow: hidden;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  color: var(--ink-soft);
  font-size: 0.69rem;
  font-weight: 700;
  background: #e3ebed;
  border-radius: 999px;
  white-space: nowrap;
}

.badge.is-positive {
  color: #13643d;
  background: #daf0e3;
}

.badge.is-warning {
  color: #835b11;
  background: #f6eacb;
}

.loading-state {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.loading-state span {
  width: 8px;
  aspect-ratio: 1;
  background: var(--blue);
  border-radius: 50%;
  animation: loading 900ms ease-in-out infinite alternate;
}

.loading-state span:nth-child(2) {
  animation-delay: 150ms;
}

.loading-state span:nth-child(3) {
  animation-delay: 300ms;
}

.message-state {
  min-height: 340px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 48px 24px;
  text-align: center;
}

.message-symbol {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--blue);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.message-state h2 {
  margin: 0;
  font-size: 1.25rem;
}

.message-state p {
  max-width: 450px;
  margin: 10px 0 22px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.secondary-button {
  padding: 0 18px;
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--blue);
}

.secondary-button:hover {
  color: var(--white);
  background: var(--blue);
}

.sidebar-backdrop {
  display: none;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes drift {
  to {
    transform: translate(-18px, 24px) scale(1.03);
  }
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 26px rgb(95 153 255 / 0%);
  }
}

@keyframes loading {
  to {
    opacity: 0.25;
    transform: translateY(-7px);
  }
}

@media (max-width: 900px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-panel {
    width: 100%;
    min-height: 100svh;
    padding: clamp(24px, 4vh, 40px) clamp(24px, 8vw, 80px);
  }

  .login-atmosphere {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-102%);
    width: min(82vw, 290px);
    transition: transform 220ms ease;
  }

  .app-shell.menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 15;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgb(11 24 30 / 58%);
    border: 0;
    transition:
      opacity 220ms ease,
      visibility 220ms ease;
  }

  .app-shell.menu-open .sidebar-backdrop {
    visibility: visible;
    opacity: 1;
  }

  .menu-button {
    display: block;
  }

  .topbar {
    min-height: 92px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .login-copy {
    margin: clamp(24px, 5vh, 40px) 0 24px;
  }

  .topbar {
    align-items: center;
    padding: 16px 18px;
  }

  .topbar .eyebrow {
    display: none;
  }

  .environment {
    max-width: 110px;
    font-size: 0.68rem;
    text-align: right;
  }

  .content {
    padding: 30px 18px 60px;
  }

  .section-intro {
    display: block;
  }

  .updated-at {
    display: block;
    margin-top: 16px;
  }

  .metric {
    padding: 20px 14px;
  }

  .metric-value {
    font-size: 2.25rem;
  }
}

@media (max-height: 680px) {
  .login-panel {
    justify-content: flex-start;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .brand-mark {
    width: 46px;
  }

  .wordmark {
    font-size: 2.35rem;
  }

  .login-copy {
    margin: 22px 0 18px;
  }

  .login-copy > p:last-child {
    margin-top: 12px;
    line-height: 1.45;
  }

  .login-note {
    margin-top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
