:root {
  color-scheme: dark;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --black: #0f1010;
  --main: #161616;
  --main-raised: #1d1d1d;
  --sidebar: #303535;
  --sidebar-deep: #292f2f;
  --sidebar-row: #444a4a;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #d8d8d8;
  --muted: #b2b4b3;
  --dim: #8c8f8e;
  --green: #5ec587;
  --red: #ff5b5f;
  --orange: #ff8f2d;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--main);
  color: var(--text);
}

button {
  font: inherit;
  color: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0;
}

.brand-panel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 18px;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(160deg, #2e2b2a 0%, #2e2b2a 14%, #2b2f32 28%, #353839 50%, #3c3c3c 100%),
    var(--sidebar);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 70px rgba(0, 0, 0, 0.25);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
}

.brand-panel::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 238px;
  height: 86px;
  transform: skewY(-7deg);
  background:
    linear-gradient(90deg, rgba(255, 143, 45, 0.85), rgba(255, 143, 45, 0.18) 22%, transparent 22%),
    linear-gradient(180deg, rgba(231, 238, 231, 0.22), rgba(69, 76, 72, 0.4));
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}

.brand-mark,
.eyebrow,
.brand-panel h1,
.brand-copy,
.signal-row {
  position: relative;
  z-index: 2;
}

.brand-mark {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #101111;
  background: var(--green);
  font-size: 22px;
  font-weight: 840;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 14px 34px rgba(0, 0, 0, 0.3);
}

.eyebrow {
  margin: 0;
  color: #ffb06c;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 0;
  color: #f7f5ec;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.94;
  letter-spacing: 0;
}

.brand-copy {
  max-width: 570px;
  margin: 0;
  color: rgba(245, 244, 237, 0.78);
  font-size: 15px;
  font-weight: 570;
  line-height: 1.58;
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(440px, 100%);
  margin-top: 14px;
}

.signal-row span {
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(16, 17, 17, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.signal-row span:nth-child(1)::before,
.signal-row span:nth-child(2)::before,
.signal-row span:nth-child(3)::before {
  display: block;
  padding: 12px 12px 2px;
  color: rgba(245, 245, 245, 0.78);
  font-size: 12px;
  font-weight: 820;
}

.signal-row span:nth-child(1)::before {
  content: "Gateway";
}

.signal-row span:nth-child(2)::before {
  content: "Cognito";
  color: #ffb06c;
}

.signal-row span:nth-child(3)::before {
  content: "OpenRouter";
  color: var(--green);
}

.auth-panel {
  align-self: center;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: #2c2c2c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 48px rgba(0, 0, 0, 0.2);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  height: 36px;
  margin-bottom: 32px;
}

.tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(226, 228, 228, 0.68);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.tab:hover,
.tab:focus-visible {
  outline: 0;
  background: rgba(255, 255, 255, 0.09);
}

.tab.is-active {
  color: #e7e7e7;
  background: #101111;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 1px 6px rgba(0, 0, 0, 0.25);
}

.panel-heading {
  padding: 0 4px;
}

.panel-heading h2 {
  margin: 0 0 9px;
  color: #ededed;
  font-size: 25px;
  font-weight: 780;
  line-height: 1.12;
  letter-spacing: 0;
}

.panel-heading p {
  min-height: 44px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.primary-actions,
.provider-actions {
  display: grid;
  gap: 10px;
}

.primary-button,
.provider-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.2;
}

.primary-button {
  color: #101111;
  background: var(--green);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 12px 30px rgba(94, 197, 135, 0.18);
}

.primary-button:hover,
.primary-button:focus-visible {
  outline: 0;
  background: #72dda0;
}

.provider-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eeeeee;
  background: rgba(255, 255, 255, 0.06);
}

.provider-button:hover,
.provider-button:focus-visible {
  outline: 0;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 4px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.status-message {
  min-height: 22px;
  margin: auto 4px 0;
  color: #ffd4d4;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

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

  .shell {
    grid-template-columns: 1fr;
    width: min(560px, calc(100% - 28px));
    padding: 18px 0;
  }

  .brand-panel {
    min-height: 360px;
  }

  .brand-panel::after {
    bottom: 156px;
  }

  h1 {
    font-size: clamp(36px, 12vw, 58px);
  }

  .auth-panel {
    min-height: 500px;
  }
}
