@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700&display=swap");

:root {
  --bg-0: #070d14;
  --bg-1: #0b1620;
  --bg-2: #0f1f2c;
  --panel: rgba(248, 252, 255, 0.94);
  --panel-soft: rgba(238, 245, 250, 0.86);
  --panel-strong: #ffffff;
  --panel-ink: #112433;
  --text: #102436;
  --muted: #4d6478;
  --line: rgba(31, 68, 91, 0.18);
  --line-strong: rgba(25, 85, 121, 0.28);
  --accent: #08a7a2;
  --accent-strong: #057b78;
  --accent-soft: rgba(8, 167, 162, 0.14);
  --warn: #d6881d;
  --warn-soft: rgba(214, 136, 29, 0.16);
  --danger: #c13d4f;
  --danger-soft: rgba(193, 61, 79, 0.14);
  --ok: #278f63;
  --ok-soft: rgba(39, 143, 99, 0.14);
  --shadow-lg: 0 26px 64px rgba(4, 18, 28, 0.38);
  --shadow-md: 0 14px 36px rgba(10, 34, 52, 0.2);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% -6%, rgba(8, 167, 162, 0.22), transparent 34%),
    radial-gradient(
      circle at 90% 110%,
      rgba(214, 136, 29, 0.18),
      transparent 42%
    ),
    linear-gradient(145deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-2) 100%);
  padding: 1.25rem;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 34vw;
  height: 34vw;
  border-radius: 999px;
  filter: blur(68px);
  opacity: 0.22;
  pointer-events: none;
}

body::before {
  top: -11vw;
  right: -8vw;
  background: #08a7a2;
}

body::after {
  bottom: -10vw;
  left: -10vw;
  background: #d6881d;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: 0.01em;
  color: #0e2635;
}

p {
  margin: 0;
}

.app {
  max-width: 1540px;
  margin: 0 auto;
}

.panel {
  background: var(--panel);
  color: var(--panel-ink);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.panel-subtle {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.login-panel {
  min-height: 76vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.3rem;
  padding: 2.2rem;
}

.brand {
  align-self: center;
  display: grid;
  gap: 0.75rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: var(--accent-strong);
  font-size: 0.72rem;
}

.brand h1 {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.12;
}

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

.login-form {
  align-self: center;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: grid;
  gap: 0.95rem;
  box-shadow: var(--shadow-md);
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
}

.sidebar {
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(11, 29, 42, 0.95), rgba(16, 40, 57, 0.92)),
    radial-gradient(
      circle at top right,
      rgba(8, 167, 162, 0.35),
      transparent 45%
    );
  color: #e9f4ff;
  display: grid;
  align-content: start;
  gap: 1rem;
}

.sidebar-head {
  display: grid;
  gap: 0.35rem;
}

.sidebar h2 {
  margin-top: 0.1rem;
  color: #f2fbff;
  font-size: 1.28rem;
}

.sidebar .muted {
  color: rgba(225, 244, 255, 0.72);
  font-size: 0.86rem;
}

.nav {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.nav-item {
  appearance: none;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: #d6eaf5;
  text-align: left;
  border-radius: var(--radius-sm);
  padding: 0.64rem 0.78rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.nav-item:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.nav-item.active {
  background: linear-gradient(
    120deg,
    rgba(8, 167, 162, 0.36),
    rgba(8, 167, 162, 0.16)
  );
  border-color: rgba(127, 241, 235, 0.45);
  color: #f4ffff;
  box-shadow: inset 3px 0 0 #7ff1eb;
}

.workspace {
  display: grid;
  gap: 1rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  position: sticky;
  top: 0.65rem;
  z-index: 5;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.topbar-left {
  gap: 1rem;
}

.topbar-title {
  display: grid;
  gap: 0.1rem;
  min-width: 176px;
}

.topbar-title h3 {
  font-size: 1.02rem;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.34rem 0.74rem;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: #e5eef4;
  color: #23435a;
  border: 1px solid rgba(33, 67, 90, 0.17);
}

.chip.tone-ok {
  color: #166746;
  background: var(--ok-soft);
  border-color: rgba(39, 143, 99, 0.3);
}

.chip.tone-warn {
  color: #7f5309;
  background: var(--warn-soft);
  border-color: rgba(214, 136, 29, 0.3);
}

.chip.tone-fail {
  color: #86293a;
  background: var(--danger-soft);
  border-color: rgba(193, 61, 79, 0.32);
}

.chip.tone-neutral {
  color: #2d526b;
  background: rgba(48, 108, 150, 0.11);
  border-color: rgba(48, 108, 150, 0.25);
}

.tab-page {
  padding: 1.15rem;
  display: grid;
  gap: 1rem;
  animation: fade-in 0.22s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.85rem;
}

.section-head h2 {
  font-size: 1.2rem;
}

.section-head.compact {
  margin-bottom: 0.1rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.72rem;
}

.kpi-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(248, 252, 255, 0.88)
  );
  padding: 0.88rem;
  box-shadow: 0 8px 18px rgba(18, 46, 64, 0.08);
}

.kpi-card h3 {
  font-size: 0.79rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 0.42rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.22rem;
  font-weight: 600;
}

.stack-form {
  display: grid;
  gap: 1rem;
}

.form-group {
  display: grid;
  gap: 0.84rem;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.8rem;
}

.brand-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  padding: 0.9rem;
  display: grid;
  gap: 0.72rem;
  box-shadow: 0 10px 22px rgba(19, 45, 63, 0.08);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.72rem;
}

label {
  display: grid;
  gap: 0.36rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--panel-ink);
}

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

input,
select,
textarea {
  border: 1px solid rgba(38, 82, 111, 0.23);
  border-radius: 10px;
  padding: 0.58rem 0.68rem;
  background: #fefeff;
  color: #132c3d;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(8, 167, 162, 0.6);
  box-shadow: 0 0 0 3px rgba(8, 167, 162, 0.14);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

button {
  border: none;
  border-radius: 10px;
  background: linear-gradient(120deg, #079f9a, #08a7a2 55%, #20bbb5);
  color: #f4fffe;
  padding: 0.54rem 0.95rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition:
    transform 0.14s ease,
    filter 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

button.secondary {
  background: linear-gradient(120deg, #e7eef4, #dbe6ef);
  color: #20384b;
}

button.secondary:hover {
  filter: brightness(1.01);
}

button.danger {
  background: linear-gradient(120deg, #c13d4f, #ad3242);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.stack-list {
  display: grid;
  gap: 0.56rem;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.82rem;
  display: grid;
  gap: 0.34rem;
  box-shadow: 0 4px 14px rgba(15, 48, 69, 0.07);
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
}

.weekdays {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.58rem;
  font-size: 0.84rem;
  color: #314f64;
}

.weekdays span {
  font-weight: 800;
}

.timeline {
  padding: 0.85rem;
  border-color: var(--line-strong);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0.72rem;
}

.history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.72rem;
}

.history-pane {
  display: grid;
  align-content: start;
  gap: 0.62rem;
}

.history-entry {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem;
  display: grid;
  gap: 0.32rem;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.history-entry:hover {
  transform: translateY(-1px);
  border-color: rgba(8, 167, 162, 0.35);
  box-shadow: 0 10px 18px rgba(8, 98, 120, 0.1);
}

.history-entry.active {
  border-color: rgba(8, 167, 162, 0.52);
  box-shadow:
    inset 0 0 0 1px rgba(8, 167, 162, 0.45),
    0 10px 18px rgba(8, 98, 120, 0.12);
  background: rgba(239, 250, 251, 0.95);
}

.history-detail {
  min-height: 300px;
}

.history-detail pre {
  margin: 0.45rem 0 0;
  border: 1px solid rgba(39, 93, 126, 0.25);
  border-radius: 9px;
  background: #f7fbfe;
  padding: 0.68rem;
  white-space: pre-wrap;
  max-height: 320px;
  overflow: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
}

.status-text {
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-text.ok {
  color: var(--ok);
}

.status-text.warn {
  color: #8f5e0e;
}

.status-text.fail {
  color: var(--danger);
}

.provider-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.62rem;
}

.status-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-strong);
  padding: 0.68rem;
  display: grid;
  gap: 0.3rem;
}

.status-pill {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pill.ok {
  color: var(--ok);
}

.status-pill.missing {
  color: #915d10;
}

.code-box {
  margin: 0;
  margin-top: 0.7rem;
  border: 1px solid rgba(39, 93, 126, 0.26);
  border-radius: 9px;
  background: #f9fcff;
  color: #243a4b;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.79rem;
  padding: 0.78rem;
  white-space: pre-wrap;
}

.hint {
  margin-top: 0.22rem;
  font-size: 0.81rem;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 0.8rem;
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .topbar {
    position: static;
  }
}

@media (max-width: 760px) {
  body {
    padding: 0.74rem;
  }

  .login-panel {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 1.1rem;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  .topbar-left,
  .topbar-right {
    justify-content: flex-start;
  }

  .topbar-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .history-layout {
    grid-template-columns: 1fr;
  }
}
