:root {
  font-family: "Segoe UI Variable", "Segoe UI", "SF Pro Text", "Helvetica Neue", sans-serif;
  color: #eef6ff;
  background:
    radial-gradient(circle at 12% 12%, rgba(45, 204, 188, 0.18), transparent 24%),
    radial-gradient(circle at 88% 16%, rgba(64, 116, 255, 0.16), transparent 22%),
    linear-gradient(180deg, #06101d 0%, #0a1423 52%, #0c1523 100%);
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.client-shell {
  width: 100%;
  height: 100%;
  padding: 18px;
  overflow: hidden;
}

.app-shell {
  width: min(1140px, 100%);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.app-header,
.status-card,
.resource-panel,
.login-card,
.error {
  background: linear-gradient(180deg, rgba(14, 24, 40, 0.88) 0%, rgba(11, 19, 33, 0.9) 100%);
  border: 1px solid rgba(142, 174, 226, 0.13);
  box-shadow: 0 28px 80px rgba(2, 8, 18, 0.34);
}

.app-header {
  border-radius: 28px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-icon-shell {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(17, 45, 64, 0.92) 0%, rgba(11, 24, 36, 0.88) 100%);
  border: 1px solid rgba(108, 211, 200, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.brand-icon {
  width: 48px;
  height: 48px;
}

.brand-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.section-eyebrow {
  margin: 0;
  color: #73dfc0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.brand-text h1,
.panel-head h2,
.status-hero h2,
.panel-head h3 {
  margin: 0;
}

.brand-text h1 {
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.brand-subtitle {
  margin: 0;
  color: #9fb3d4;
  font-size: 0.98rem;
  max-width: 520px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  flex: none;
}

.header-actions-secondary,
.header-actions-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.action-button {
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.action-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.action-button:active:not(:disabled) {
  transform: translateY(0);
}

.action-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.action-button-primary {
  color: #04131a;
  background: linear-gradient(135deg, #73e0c7 0%, #30b89a 100%);
  box-shadow: 0 12px 28px rgba(43, 188, 151, 0.18);
}

.action-button-secondary {
  color: #eef6ff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(176, 198, 228, 0.14);
}

.action-button-secondary:hover:not(:disabled),
.action-button-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(176, 198, 228, 0.22);
}

.action-button-ghost {
  color: #c0d1ea;
  background: transparent;
  border-color: rgba(176, 198, 228, 0.08);
}

.action-button-danger {
  color: #f8fbff;
  background: linear-gradient(135deg, #1f4a54 0%, #107a6e 100%);
  border-color: rgba(117, 225, 204, 0.22);
  box-shadow: 0 10px 28px rgba(17, 137, 121, 0.18);
}

.body-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 18px;
  align-items: start;
}

.main-column {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
}

.status-card {
  min-height: 0;
  border-radius: 30px;
  padding: 22px;
  display: grid;
  gap: 18px;
}

.status-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.status-hero h2 {
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.status-support {
  margin: 8px 0 0;
  color: #9db3d6;
  font-size: 0.98rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #d7e3f5;
  border: 1px solid rgba(176, 198, 228, 0.1);
  white-space: nowrap;
}

.status-pill.is-online {
  background: rgba(46, 188, 156, 0.12);
  border-color: rgba(111, 226, 194, 0.16);
}

.status-pulse {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff8e84;
  box-shadow: 0 0 0 0 rgba(255, 142, 132, 0.34);
}

.status-pill.is-online .status-pulse {
  background: #73dfc0;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(115, 223, 192, 0.36);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(115, 223, 192, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(115, 223, 192, 0);
  }
}

.status-details {
  min-height: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(154, 181, 228, 0.08);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 {
  font-size: 1.3rem;
  line-height: 1.1;
}

.panel-head h3 {
  font-size: 1rem;
  line-height: 1.1;
}

.panel-head-compact {
  align-items: center;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-tile {
  min-height: 86px;
  padding: 14px;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(154, 181, 228, 0.08);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.stat-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(118, 218, 200, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.stat-tile-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(30, 71, 88, 0.75) 0%, rgba(17, 31, 48, 0.72) 100%);
  border: 1px solid rgba(111, 226, 194, 0.12);
}

.stat-tile-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #80e4cc;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-tile-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.stat-tile-copy span {
  color: #8fa6ca;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-tile-copy strong {
  color: #f4f8ff;
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  word-break: break-word;
}

.resource-panel,
.login-card {
  min-height: 0;
  border-radius: 30px;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.resource-panel {
  grid-auto-rows: min-content;
  align-content: start;
}

.resource-count {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #80e4cc;
  background: rgba(23, 62, 71, 0.8);
  border: 1px solid rgba(111, 226, 194, 0.12);
}

.resource-meta {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(154, 181, 228, 0.08);
}

.resource-meta small,
.resource-selector small {
  color: #91a8cc;
  font-size: 0.82rem;
  line-height: 1.35;
}

.resource-selector {
  display: grid;
  gap: 8px;
}

.resource-selector select {
  width: 100%;
  border: 1px solid rgba(177, 197, 229, 0.16);
  background: rgba(7, 14, 27, 0.9);
  color: #f5f7fb;
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.resource-selector select:hover:not(:disabled),
.resource-selector select:focus-visible {
  border-color: rgba(118, 218, 200, 0.28);
  background: rgba(10, 18, 32, 0.96);
}

.resource-selector select:disabled {
  opacity: 0.7;
  cursor: default;
}

.resource-meta-label {
  color: #8fa6ca;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
}

.resource-item {
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(154, 181, 228, 0.08);
}

.resource-item-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #73dfc0;
  box-shadow: 0 0 0 4px rgba(115, 223, 192, 0.08);
  flex: none;
}

.resource-item-text {
  font-weight: 600;
  color: #eff6ff;
  word-break: break-word;
}

.resource-footer {
  display: flex;
}

.resource-footer .action-button {
  width: 100%;
}

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

.login-card label {
  display: grid;
  gap: 8px;
  color: #c2cfe5;
}

.login-card input {
  border: 1px solid rgba(177, 197, 229, 0.16);
  background: rgba(7, 14, 27, 0.9);
  color: #f5f7fb;
  border-radius: 16px;
  padding: 14px 16px;
}

.login-actions {
  display: flex;
}

.error {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 115, 115, 0.08);
  border-color: rgba(255, 115, 115, 0.15);
  color: #ffc3c3;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .client-shell {
    padding: 14px;
  }

  .app-shell {
    width: 100%;
    gap: 14px;
  }

  .app-header {
    padding: 18px;
  }

  .brand-text h1 {
    font-size: 1.7rem;
  }

  .body-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 14px;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .client-shell {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .app-shell {
    height: auto;
    grid-template-rows: auto;
  }

  .app-header,
  .status-hero,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions,
  .header-actions-secondary,
  .header-actions-primary,
  .resource-footer,
  .login-actions {
    width: 100%;
  }

  .header-actions .action-button,
  .header-actions-secondary .action-button,
  .header-actions-primary .action-button,
  .resource-footer .action-button,
  .login-actions .action-button {
    width: 100%;
  }

  .body-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }
}
