:root {
  --bg: #050505;
  --panel: rgba(20, 20, 20, 0.88);
  --panel-border: rgba(255, 184, 28, 0.12);
  --text: #f2f2f2;
  --muted: #bebebe;
  --accent: #ffb61f;
  --accent-warm: #ffd15a;
  --danger: #ff6d79;
  --success: #49dcb1;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 182, 31, 0.22), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 26%),
    linear-gradient(145deg, #030303 0%, #0d0d0d 58%, #141414 100%);
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.ambient {
  position: fixed;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
}

.ambient-left {
  top: -8rem;
  left: -10rem;
  background: #ffb61f;
}

.ambient-right {
  right: -8rem;
  bottom: -8rem;
  background: #e9e9e9;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-height: 92px;
}

.brand-logo {
  max-width: min(420px, 100%);
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.32));
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 10px;
  max-width: 12ch;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 0.95;
}

h2 {
  margin-top: 4px;
  font-size: 1.2rem;
}

.lede {
  margin-top: 16px;
  max-width: 58ch;
  color: #d7d7d7;
  font-size: 1rem;
  line-height: 1.6;
}

.hero-meta {
  position: relative;
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 24, 10, 0.9), rgba(18, 18, 18, 0.82));
  box-shadow: var(--shadow);
}

.environment-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 56px;
  padding: 8px 12px;
  border: 1px solid rgba(73, 220, 177, 0.32);
  border-radius: 999px;
  background: rgba(73, 220, 177, 0.14);
  color: #d9fff3;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 182, 31, 0.12);
  border: 1px solid rgba(255, 182, 31, 0.28);
  color: #ffe4a5;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 182, 31, 0.12);
}

.refresh-button {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  color: #171717;
  background: linear-gradient(135deg, var(--accent) 0%, #ffd978 100%);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.refresh-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(255, 182, 31, 0.22);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 11px 16px;
  background: rgba(255, 182, 31, 0.06);
  color: var(--text);
}

.timestamp,
.panel-label,
.kpi-label {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--muted);
}

.app-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.tab-button {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.tab-button.is-active,
.tab-button:hover {
  background: linear-gradient(135deg, rgba(255, 182, 31, 0.18), rgba(255, 209, 90, 0.12));
  color: var(--text);
}

.workspace {
  display: grid;
  gap: 18px;
}

.hidden {
  display: none !important;
}

.panel,
.kpi-card {
  position: relative;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.panel {
  padding: 22px;
}

.login-panel {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  align-items: center;
  min-height: 310px;
}

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

label {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #d8edf7;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
}

textarea {
  resize: vertical;
}

.login-form button {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  color: #171717;
  background: linear-gradient(135deg, var(--accent) 0%, #ffd978 100%);
}

.provision-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.message {
  min-height: 22px;
  color: var(--danger);
}

.selection-summary {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.kpi-card {
  padding: 22px;
  padding-right: 44px;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.75;
}

.kpi-value {
  display: block;
  margin-top: 14px;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 700;
  line-height: 1;
}

.kpi-delta {
  margin-top: 10px;
  color: #d8edf7;
  font-size: 0.92rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.split.single-visible {
  grid-template-columns: 1fr;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 20px;
}

.panel-tag,
.status {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 182, 31, 0.1);
  border: 1px solid rgba(255, 182, 31, 0.2);
  color: #ffe3a2;
  font-size: 0.82rem;
  font-weight: 700;
}

.list {
  display: grid;
  gap: 14px;
}

.row,
code {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.row strong,
.row small {
  display: block;
}

.row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.row > span:not(.status) {
  color: #ffe3a2;
  font-weight: 700;
}

.endpoint-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

code {
  display: block;
  overflow-wrap: anywhere;
  color: #ffe3a2;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
}

.secret-output {
  border-color: rgba(73, 220, 177, 0.24);
  color: #d9fff3;
}

.empty {
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .login-panel,
  .metric-grid,
  .split,
  .endpoint-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    justify-items: stretch;
  }

  .refresh-button,
  .ghost-button {
    width: 100%;
  }
}
