:root {
  font-family: Inter, "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171b25;
  background: #f5f4f0;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #626fec; outline-offset: 3px; }

.skip-link { position: absolute; top: -60px; left: 20px; background: #fff; padding: 12px; z-index: 10; }
.skip-link:focus { top: 12px; }
.topbar {
  height: 76px;
  border-bottom: 1px solid #dddfdf;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(32px, calc((100vw - 1200px) / 2));
  background: #faf9f6;
}
.wordmark { font-size: 20px; font-weight: 750; letter-spacing: -.05em; }
.wordmark span {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin-right: 5px;
  background: #555fe3;
  color: #fff;
  border-radius: 8px;
  font-size: 18px;
  letter-spacing: 0;
}
.topbar-right { display: flex; align-items: center; gap: 28px; font-size: 13px; font-weight: 650; }
.topbar-right a:hover, .text-button:hover { color: #505be0; }
.environment, .eyebrow { font-size: 10px; font-weight: 750; letter-spacing: .16em; color: #717687; }
.environment { padding: 8px 10px; border: 1px solid #d8dae0; border-radius: 5px; }

.shell { max-width: 1200px; margin: 0 auto; padding: 76px 32px 100px; }
.page-heading { max-width: 720px; margin-bottom: 50px; }
.page-heading h1 {
  font-size: clamp(42px, 5.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -.065em;
  margin: 15px 0 20px;
  font-weight: 680;
}
.page-heading > p:last-child { font-size: 18px; line-height: 1.6; color: #666b76; margin: 0; }

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 530px;
  border: 1px solid #dadcde;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 50px rgba(22, 27, 39, .045);
}
.auth-intro {
  background: #181d2a;
  color: #fff;
  padding: 46px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}
.auth-intro::before {
  content: "@";
  position: absolute;
  top: -140px;
  right: -50px;
  font-size: 420px;
  font-weight: 800;
  letter-spacing: -.1em;
  color: #242b3a;
  line-height: 1;
}
.intro-mark { position: absolute; top: 45px; left: 46px; color: #a9b1ff; font-size: 32px; }
.auth-intro h2 {
  position: relative;
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1.08;
  letter-spacing: -.055em;
  max-width: 440px;
  margin: 0 0 18px;
}
.auth-intro p { position: relative; color: #b4bbca; line-height: 1.65; max-width: 410px; margin: 0 0 55px; }
.intro-foot { position: relative; border-top: 1px solid #343b49; padding-top: 20px; font-size: 12px; color: #858fa1; }
.auth-card { padding: 38px min(5vw, 70px); display: flex; flex-direction: column; }
.auth-tabs { display: flex; flex-wrap: wrap; gap: 16px; border-bottom: 1px solid #e4e6e9; margin-bottom: 46px; }
.auth-tabs button {
  background: none;
  border: 0;
  padding: 0 0 14px;
  color: #838894;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 2px solid transparent;
}
.auth-tabs button.active { color: #171b25; border-color: #525fe0; }
.auth-card form { max-width: 380px; width: 100%; margin: auto; }
.auth-card h2 { font-size: 32px; letter-spacing: -.05em; margin: 0 0 8px; }
.auth-card form > p, .create-panel > p:not(.eyebrow) { color: #6e7380; line-height: 1.55; font-size: 14px; margin: 0 0 30px; }
.auth-card label, .create-panel label { display: block; font-size: 12px; font-weight: 700; margin: 18px 0 9px; }
.auth-card input, .create-panel input {
  width: 100%;
  border: 1px solid #d9dce1;
  border-radius: 7px;
  padding: 13px 14px;
  background: #fff;
  color: #171b25;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-card input:focus, .create-panel input:focus { border-color: #626fec; box-shadow: 0 0 0 3px #626fec24; }
.auth-card small { display: block; margin-top: 9px; color: #777e8a; font-size: 11px; }
.primary-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #4d5ad8;
  border-radius: 7px;
  background: #515fe0;
  color: #fff;
  padding: 14px 16px;
  margin-top: 28px;
  font-size: 13px;
  font-weight: 750;
  transition: background .15s ease, transform .12s ease;
}
.primary-button:hover { background: #424fc8; }
.primary-button:active { transform: scale(.99); }
.primary-button:disabled { opacity: .55; cursor: wait; }
.auth-link { margin-top: 18px; }

.workspace-top { display: flex; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.workspace-top h2 { font-size: 28px; letter-spacing: -.045em; margin: 10px 0 0; }
.text-button { background: transparent; border: 0; font-size: 13px; font-weight: 700; padding: 8px 0; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.metric, .keys-panel, .create-panel { background: #fff; border: 1px solid #dfe1e3; border-radius: 13px; }
.metric { padding: 26px; min-height: 155px; }
.metric > span { display: block; color: #747987; font-size: 12px; font-weight: 700; margin-bottom: 18px; }
.metric strong { display: block; font-size: 36px; letter-spacing: -.06em; font-weight: 650; line-height: 1; }
.metric strong em { font-size: 17px; color: #a3a8b2; font-style: normal; letter-spacing: -.03em; }
.metric small { display: block; color: #8d929c; font-size: 11px; margin-top: 14px; }
.keys-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.keys-panel, .create-panel { padding: 28px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eceef0; padding-bottom: 20px; }
.panel-heading h3, .create-panel h3 { font-size: 25px; letter-spacing: -.05em; margin: 8px 0 0; }
.panel-note { font-size: 11px; color: #858b98; }
.keys-list { min-height: 150px; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid #eceef0; }
.key-row:last-child { border-bottom: 0; }
.key-row strong { display: block; font-size: 13px; }
.key-row small { display: block; font-size: 11px; color: #8a909a; margin-top: 6px; }
.key-row button, .secondary-button {
  background: #fff;
  border: 1px solid #d7dae0;
  border-radius: 6px;
  padding: 9px 12px;
  color: #4b5360;
  font-size: 11px;
  font-weight: 700;
}
.key-row button:hover, .secondary-button:hover { border-color: #7e89e8; color: #4c59d3; }
.empty-state { font-size: 13px; color: #858b98; padding: 35px 0; }
.create-panel > p:not(.eyebrow) { margin: 13px 0 23px; }
.create-panel .primary-button { margin-top: 20px; }
.secret-box { margin-top: 22px; padding: 15px; background: #f2f3ff; border: 1px solid #d9ddff; border-radius: 8px; }
.secret-box span { display: block; font-size: 11px; font-weight: 700; color: #555ec0; margin-bottom: 10px; }
.secret-box code { display: block; overflow-wrap: anywhere; font-size: 11px; line-height: 1.5; margin-bottom: 13px; }
.status-message {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 40px));
  margin: 0;
  padding: 14px 16px;
  color: #a93543;
  background: #fff;
  border: 1px solid #ead4d8;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(22, 27, 39, .12);
  font-size: 13px;
  line-height: 1.4;
}
.status-message:empty { display: none; }
.status-message.success { color: #287450; border-color: #cfe7d8; }
.footer {
  border-top: 1px solid #dddfe1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px max(32px, calc((100vw - 1200px) / 2));
  color: #8a909a;
  font-size: 11px;
}

@media (max-width: 800px) {
  .topbar { padding: 0 20px; }
  .environment { display: none; }
  .shell { padding: 55px 20px 70px; }
  .auth-grid, .keys-grid { grid-template-columns: 1fr; }
  .auth-intro { min-height: 260px; padding: 30px; }
  .intro-mark { top: 25px; left: 30px; }
  .auth-intro h2 { font-size: 32px; }
  .auth-intro p { margin-bottom: 20px; }
  .auth-card { padding: 30px; min-height: 420px; }
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 130px; }
  .footer { padding: 24px 20px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
