:root {
  --bg: #0d1117;
  --panel: rgba(17, 24, 34, 0.88);
  --panel-strong: rgba(12, 18, 26, 0.96);
  --line: rgba(141, 176, 197, 0.18);
  --line-strong: rgba(141, 176, 197, 0.32);
  --text: #e9f0f5;
  --muted: #8ea3b3;
  --accent: #7ae0c3;
  --accent-strong: #b8ffe2;
  --danger: #ff8a80;
  --warning: #f5d48b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: "IBM Plex Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(122, 224, 195, 0.12), transparent 32%),
    radial-gradient(circle at 85% 15%, rgba(91, 132, 255, 0.14), transparent 24%),
    linear-gradient(180deg, #0b1016 0%, #090d13 100%);
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.6;
}

.ambient-a {
  top: 6rem;
  right: -4rem;
  width: 16rem;
  height: 16rem;
  background: rgba(122, 224, 195, 0.12);
}

.ambient-b {
  bottom: 4rem;
  left: -2rem;
  width: 18rem;
  height: 18rem;
  background: rgba(105, 135, 255, 0.12);
}

.shell {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: end;
  margin-bottom: 26px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.session-card,
.panel,
.toast {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.session-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.session-card {
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, rgba(21, 31, 43, 0.92), rgba(12, 17, 25, 0.96));
}

.session-label,
.session-hint,
.subtle {
  color: var(--muted);
  font-size: 13px;
}

.session-email {
  margin-top: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  word-break: break-all;
}

.session-hint {
  margin-top: 12px;
  line-height: 1.6;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.panel {
  padding: 22px;
}

.panel-primary {
  background:
    linear-gradient(135deg, rgba(122, 224, 195, 0.08), transparent 48%),
    linear-gradient(180deg, rgba(17, 24, 34, 0.92), rgba(12, 18, 26, 0.96));
}

.panel-head,
.result-head,
.subsection-head,
.actions,
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-badge {
  padding: 8px 12px;
  border: 1px solid rgba(122, 224, 195, 0.24);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 12px;
  font-family: "IBM Plex Mono", monospace;
  background: rgba(122, 224, 195, 0.08);
}

.panel-badge.muted {
  border-color: var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.stack {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.stack.compact {
  margin-top: 18px;
}

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

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

.field span {
  color: var(--muted);
  font-size: 13px;
}

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

input,
select {
  width: 100%;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 12, 18, 0.78);
  color: var(--text);
  outline: none;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  background: rgba(10, 16, 24, 0.9);
}

.button {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 13px 16px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(122, 224, 195, 0.38);
}

.button-primary {
  border-color: rgba(122, 224, 195, 0.4);
  background: linear-gradient(180deg, rgba(122, 224, 195, 0.18), rgba(122, 224, 195, 0.1));
  color: var(--accent-strong);
}

.button-danger {
  border-color: rgba(255, 138, 128, 0.3);
  color: #ffd2cd;
  background: rgba(255, 138, 128, 0.08);
}

.button-ghost {
  padding: 10px 12px;
  border-radius: 14px;
}

.result-block,
.subsection {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.code-output {
  margin: 14px 0 0;
  min-height: 180px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: #d6f6ec;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow: auto;
  white-space: pre-wrap;
}

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

.placeholder {
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.hidden {
  display: none;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.meta-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 14, 21, 0.8);
}

.meta-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.meta-value {
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.activation-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.activation-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(9, 13, 19, 0.74);
}

.activation-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.activation-card p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}

.status-bar {
  margin-top: 18px;
}

.toast {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(12, 18, 26, 0.84);
  color: var(--muted);
}

.toast.success {
  color: #d7fff1;
  border-color: rgba(122, 224, 195, 0.22);
}

.toast.error {
  color: #ffd8d5;
  border-color: rgba(255, 138, 128, 0.24);
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 9, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.overlay.hidden {
  display: none;
}

.login-card {
  width: min(100%, 460px);
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 27, 38, 0.96), rgba(10, 14, 21, 0.98));
  box-shadow: var(--shadow);
}

.login-status {
  min-height: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.login-status.error {
  color: #ffd8d5;
}

.login-status.success {
  color: #d7fff1;
}

@media (max-width: 980px) {
  .hero,
  .dashboard-grid,
  .field-row,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .session-card {
    order: -1;
  }
}
