:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: rgba(14, 17, 23, 0.88);
  --panel-soft: rgba(20, 24, 32, 0.68);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f7fb;
  --muted: #8e96a8;
  --soft: #b8c0cf;
  --accent: #8f7cff;
  --accent-2: #59d7c3;
  --danger: #ff7d8e;
  --success: #63ddb4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(143, 124, 255, 0.12), transparent 30rem),
    radial-gradient(circle at 88% 84%, rgba(89, 215, 195, 0.08), transparent 34rem),
    var(--bg);
  color: var(--text);
}

button, input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.ambient {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.14;
}

.ambient-one { top: -17rem; left: -8rem; background: var(--accent); }
.ambient-two { right: -17rem; bottom: -18rem; background: var(--accent-2); }

.grid-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
}

.access-layout {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.72fr);
  gap: 72px;
  align-items: center;
  padding: 72px 0;
}

.identity-panel {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.brand-mark span {
  position: absolute;
  width: 17px;
  height: 6px;
  border-radius: 99px;
  background: var(--text);
  transform: rotate(-45deg);
}

.brand-mark span:first-child { left: 9px; top: 13px; }
.brand-mark span:last-child { right: 8px; bottom: 12px; opacity: 0.46; }

.brand-name { display: flex; flex-direction: column; gap: 2px; }
.brand-name strong { font-size: 15px; letter-spacing: -0.01em; }
.brand-name span { color: var(--muted); font-size: 12px; }

.private-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.private-chip > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px rgba(99, 221, 180, 0.75);
}

.identity-copy { max-width: 720px; padding: 72px 0; }

.eyebrow,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #a89aff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.65;
}

.identity-copy h1 {
  margin: 22px 0 22px;
  font-size: clamp(56px, 6vw, 92px);
  line-height: 0.93;
  letter-spacing: -0.065em;
  font-weight: 680;
}

.identity-copy h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 247, 251, 0.48);
}

.identity-copy p {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.trust-item {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 22px 0 0;
}

.trust-item + .trust-item {
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

.trust-icon {
  flex: 0 0 auto;
  color: #8b94a7;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding-top: 3px;
}

.trust-item div { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.trust-item strong { font-size: 12px; font-weight: 650; }
.trust-item small { color: var(--muted); font-size: 11px; line-height: 1.5; }

.access-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  padding: 42px;
  background: linear-gradient(150deg, rgba(20, 24, 32, 0.95), rgba(10, 12, 17, 0.92));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(28px);
}

.access-panel::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -100px;
  right: -70px;
  border-radius: 50%;
  background: rgba(143, 124, 255, 0.16);
  filter: blur(42px);
  pointer-events: none;
}

.panel-topline {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  gap: 5px;
}

.panel-topline span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.panel-copy { position: relative; margin-bottom: 34px; }
.panel-copy h2 { margin: 14px 0 10px; font-size: 30px; letter-spacing: -0.04em; }
.panel-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

#access-form { position: relative; }
#access-form > label {
  display: block;
  margin: 0 0 9px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.key-field { position: relative; }

.key-field input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: none;
  padding: 0 52px 0 16px;
  background: rgba(4, 6, 9, 0.72);
  color: var(--text);
  caret-color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.key-field input::placeholder { color: #626a79; }
.key-field input:focus {
  border-color: rgba(143, 124, 255, 0.62);
  background: rgba(7, 9, 13, 0.9);
  box-shadow: 0 0 0 4px rgba(143, 124, 255, 0.08);
}
.key-field input:disabled { opacity: 0.66; cursor: progress; }

.visibility-button {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #788194;
  cursor: pointer;
}

.visibility-button:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }
.visibility-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.access-button {
  width: 100%;
  height: 56px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: #f2f4f8;
  color: #090b0f;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

.access-button:hover:not(:disabled) { transform: translateY(-1px); background: #ffffff; }
.access-button:active:not(:disabled) { transform: translateY(0); }
.access-button:disabled { opacity: 0.62; cursor: progress; }
.access-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.access-button.loading svg { animation: pulse-arrow 900ms ease-in-out infinite alternate; }

@keyframes pulse-arrow { from { transform: translateX(-2px); opacity: 0.4; } to { transform: translateX(2px); opacity: 1; } }

.status-line {
  min-height: 40px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #5b6371;
}

.status-line[data-state="checking"] .status-dot { background: var(--accent); box-shadow: 0 0 12px rgba(143, 124, 255, 0.7); }
.status-line[data-state="success"] { color: var(--success); }
.status-line[data-state="success"] .status-dot { background: var(--success); box-shadow: 0 0 12px rgba(99, 221, 180, 0.65); }
.status-line[data-state="error"] { color: var(--danger); }
.status-line[data-state="error"] .status-dot { background: var(--danger); }

.panel-footer {
  margin-top: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6c7483;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-divider { width: 3px; height: 3px; border-radius: 50%; background: #4e5561; }

@media (max-width: 980px) {
  .access-layout {
    width: min(720px, calc(100% - 40px));
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 38px 0 60px;
  }
  .identity-panel { min-height: 0; }
  .identity-copy { padding: 78px 0 56px; }
  .identity-copy h1 { font-size: clamp(52px, 11vw, 78px); }
}

@media (max-width: 620px) {
  .access-layout { width: min(100% - 28px, 560px); }
  .brand-name span, .private-chip { display: none; }
  .identity-copy { padding: 60px 0 42px; }
  .identity-copy h1 { font-size: clamp(46px, 14vw, 64px); }
  .identity-copy p { font-size: 15px; }
  .trust-row { grid-template-columns: 1fr; }
  .trust-item { padding: 16px 0; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .access-panel { border-radius: 22px; padding: 32px 24px; }
}
