:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: rgba(18, 25, 37, .82);
  --panel-strong: #121a26;
  --line: rgba(177, 197, 221, .15);
  --line-bright: rgba(177, 197, 221, .28);
  --text: #f4f7fb;
  --muted: #92a0b2;
  --faint: #637085;
  --blue: #87b8ff;
  --blue-strong: #5a9dff;
  --amber: #ffc66e;
  --green: #72d5a5;
  --red: #ff8585;
  --shadow: 0 28px 80px rgba(0, 0, 0, .34);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 8%, rgba(53, 102, 168, .13), transparent 32rem),
    linear-gradient(145deg, #080c13 0%, #090e17 52%, #070a10 100%);
  overflow-x: hidden;
}

button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.ambient {
  position: fixed;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: .16;
}
.ambient-one { right: -10rem; top: 22%; background: #3479cf; }
.ambient-two { left: -13rem; bottom: -6rem; background: #a36232; opacity: .1; }

.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: .79rem; font-weight: 760; letter-spacing: .22em; }
.brand-mark { width: 28px; height: 28px; display: flex; gap: 3px; align-items: center; justify-content: center; border: 1px solid var(--line-bright); border-radius: 7px; transform: rotate(45deg); }
.brand-mark i { display: block; width: 2px; height: 12px; border-radius: 2px; background: var(--blue); transform: rotate(-45deg); }
.brand-mark i:nth-child(2) { height: 17px; background: var(--text); }
.brand-mark i:nth-child(3) { height: 8px; background: var(--amber); }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.environment, .status-pill { border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; font-size: .67rem; letter-spacing: .12em; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; letter-spacing: .02em; font-size: .72rem; }
.status-pill i, .live-label i, .policy-footnote i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(255, 198, 110, .1); }
.status-pill.available i, .live-label i, .policy-footnote i { background: var(--green); box-shadow: 0 0 0 4px rgba(114, 213, 165, .1); }
.status-pill.error i { background: var(--red); }
.quiet-button, .refresh-button, .dismiss-button { border: 0; background: none; color: var(--muted); cursor: pointer; }
.quiet-button:hover, .refresh-button:hover, .dismiss-button:hover { color: var(--text); }

main { flex: 1; padding: 72px 0 64px; }
.login-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); gap: 72px; align-items: center; min-height: 600px; }
.intro-panel { max-width: 680px; }
.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: .7rem; font-weight: 720; letter-spacing: .18em; }
.intro-panel h1, .workspace-heading h1 { margin: 0; font-size: clamp(3.1rem, 6.8vw, 6.1rem); line-height: .95; letter-spacing: -.055em; font-weight: 640; }
.intro-panel h1 span { color: transparent; -webkit-text-stroke: 1px rgba(244, 247, 251, .42); }
.intro-copy { max-width: 600px; margin: 30px 0 32px; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.primary-button { min-height: 52px; padding: 0 19px; display: inline-flex; align-items: center; justify-content: space-between; gap: 36px; border: 1px solid #8fc0ff; border-radius: 9px; background: linear-gradient(135deg, #6aa7fb, #3f82df); color: #06101e; font-weight: 760; cursor: pointer; box-shadow: 0 14px 36px rgba(55, 126, 222, .24); transition: transform .15s ease, filter .15s ease; }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.primary-button:disabled { cursor: wait; opacity: .6; transform: none; }
.primary-button.compact { min-height: 46px; gap: 24px; }
.privacy-note { margin: 16px 0 0; color: var(--faint); font-size: .77rem; }

.policy-panel, .surface, .credential-reveal { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(22, 31, 45, .88), rgba(12, 18, 28, .9)); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.policy-panel { padding: 28px; position: relative; overflow: hidden; }
.policy-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--blue), transparent 68%); }
.panel-heading, .surface-heading, .instructions-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.panel-heading h2, .surface-heading h2, .instructions-heading h2, .credential-reveal h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.025em; }
.profile-glyph { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(135, 184, 255, .3); border-radius: 9px; color: var(--blue); font-size: .65rem; letter-spacing: .1em; }
.policy-list { margin: 30px 0 24px; }
.policy-list div { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.policy-list dt { color: var(--muted); }
.policy-list dd { margin: 0; text-align: right; font-weight: 650; }
.policy-footnote { display: flex; gap: 10px; align-items: center; color: var(--faint); font-size: .75rem; }

.workspace-heading { display: flex; justify-content: space-between; gap: 32px; align-items: end; margin-bottom: 34px; }
.workspace-heading h1 { font-size: clamp(2rem, 4.4vw, 4rem); }
.workspace-heading h1 span { color: var(--blue); }
.credential-reveal { margin-bottom: 22px; padding: 25px; display: grid; grid-template-columns: minmax(230px, .7fr) minmax(340px, 1.3fr) auto; gap: 24px; align-items: center; border-color: rgba(114, 213, 165, .3); }
.credential-reveal p { margin: 7px 0 0; color: var(--muted); }
.success-text { color: var(--green); }
.key-field { display: flex; gap: 8px; min-width: 0; }
.key-field input { min-width: 0; flex: 1; height: 44px; padding: 0 13px; border: 1px solid var(--line-bright); border-radius: 8px; background: #080d15; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.icon-button, .copy-button, .code-copy { border: 1px solid var(--line-bright); border-radius: 8px; background: #172131; color: var(--text); cursor: pointer; padding: 0 13px; font-size: .78rem; }
.copy-button { background: var(--text); color: #0b111b; font-weight: 750; }
.dismiss-button { font-size: .77rem; white-space: nowrap; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 22px; }
.surface { padding: 25px; box-shadow: none; }
.refresh-button { font-size: 1.3rem; line-height: 1; }
.credential-list { margin-top: 22px; }
.empty-state { min-height: 168px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--faint); }
.empty-state p { margin: 0; }
.empty-glyph { display: grid; place-items: center; width: 42px; height: 42px; border: 1px dashed var(--line-bright); border-radius: 50%; }
.credential-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.credential-row:first-child { padding-top: 2px; }
.credential-row:last-child { border-bottom: 0; padding-bottom: 0; }
.credential-name { min-width: 0; }
.credential-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.credential-name small, .credential-meta { color: var(--faint); font-size: .72rem; }
.credential-meta { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 8px 13px; }
.credential-actions { display: flex; align-items: center; gap: 9px; }
.state-tag { padding: 5px 8px; border: 1px solid rgba(114, 213, 165, .23); border-radius: 999px; color: var(--green); font-size: .62rem; letter-spacing: .08em; }
.state-tag.revoked, .state-tag.expired { color: var(--faint); border-color: var(--line); }
.revoke-button { border: 0; background: none; color: #e6a2a2; font-size: .72rem; cursor: pointer; }
.revoke-button:hover { color: var(--red); }

.live-label { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: .62rem; letter-spacing: .12em; }
.status-list { margin-top: 24px; display: grid; gap: 19px; }
.status-list > div { display: flex; gap: 13px; align-items: center; }
.status-list strong, .status-list small { display: block; }
.status-list strong { font-size: .86rem; }
.status-list small { margin-top: 3px; color: var(--faint); font-size: .71rem; }
.status-icon { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--amber); font-size: .72rem; }
.status-icon.good { color: var(--green); border-color: rgba(114, 213, 165, .26); }
.status-icon.bad { color: var(--red); border-color: rgba(255, 133, 133, .26); }
.status-note { margin: 25px 0 0; padding-top: 19px; border-top: 1px solid var(--line); color: var(--faint); font-size: .7rem; line-height: 1.55; }

.instructions-surface { margin-top: 22px; }
.instructions-heading { align-items: end; }
.tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #0b111a; }
.tab { min-height: 32px; padding: 0 11px; border: 0; border-radius: 6px; background: none; color: var(--faint); font-size: .72rem; cursor: pointer; }
.tab.active { background: #202c3d; color: var(--text); }
.code-wrap { position: relative; margin-top: 20px; border: 1px solid var(--line); border-radius: 11px; background: #080c13; overflow: hidden; }
pre { min-height: 142px; margin: 0; padding: 23px 70px 23px 23px; overflow: auto; color: #c5d8f2; font: .8rem/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.code-copy { position: absolute; top: 12px; right: 12px; min-height: 30px; }
.code-copy:disabled { opacity: .35; cursor: not-allowed; }
.instruction-meta { display: flex; justify-content: space-between; gap: 20px; margin-top: 13px; color: var(--faint); font-size: .68rem; }

footer { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: .68rem; letter-spacing: .04em; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: min(390px, calc(100% - 48px)); padding: 13px 16px; border: 1px solid var(--line-bright); border-radius: 9px; background: #172131; color: var(--text); box-shadow: var(--shadow); font-size: .8rem; z-index: 10; }
.toast.error { border-color: rgba(255, 133, 133, .4); }

@media (max-width: 880px) {
  .login-grid, .workspace-grid { grid-template-columns: 1fr; }
  .login-grid { gap: 38px; min-height: auto; }
  .credential-reveal { grid-template-columns: 1fr; }
  .workspace-heading { align-items: flex-start; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 28px, 1180px); }
  .topbar { height: 72px; }
  .environment { display: none; }
  .status-pill > span { display: none; }
  main { padding-top: 46px; }
  .intro-panel h1 { font-size: 3.15rem; }
  .workspace-heading { display: grid; }
  .workspace-heading .primary-button { width: 100%; }
  .instructions-heading { display: grid; }
  .tabs { width: 100%; }
  .tab { flex: 1; }
  .key-field { flex-wrap: wrap; }
  .key-field input { flex-basis: 100%; }
  .icon-button, .copy-button { min-height: 40px; flex: 1; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

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

