:root {
  --gate-bg: #070b09;
  --gate-panel: #0d1410;
  --gate-panel-2: #111b15;
  --gate-line: #263a2d;
  --gate-green: #56d67b;
  --gate-green-soft: rgba(86, 214, 123, 0.12);
  --gate-text: #eef8f1;
  --gate-muted: #8da497;
  --gate-danger: #ff7b72;
}

body.access-locked {
  overflow: hidden;
  background: var(--gate-bg);
}

body.access-locked .app-shell,
body.access-locked .modal,
body.access-locked .toast-container {
  display: none !important;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(86, 214, 123, 0.08), transparent 28%),
    linear-gradient(rgba(86, 214, 123, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 214, 123, 0.025) 1px, transparent 1px),
    var(--gate-bg);
  background-size: auto, 28px 28px, 28px 28px, auto;
  color: var(--gate-text);
  font-family: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

.access-gate[hidden] {
  display: none !important;
}

.access-terminal {
  width: min(100%, 520px);
  border: 1px solid var(--gate-line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--gate-panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.access-terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border-bottom: 1px solid var(--gate-line);
  background: #0a100c;
}

.access-terminal-bar code {
  margin-left: 5px;
  overflow: hidden;
  color: var(--gate-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ff6b63; }
.terminal-dot.amber { background: #f0ba4d; }
.terminal-dot.green { background: var(--gate-green); }

.access-terminal-body {
  padding: 30px 34px 24px;
}

.cat-illustration {
  width: 190px;
  max-width: 55%;
  margin: 0 auto 8px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

.cat-illustration svg {
  display: block;
  width: 100%;
  height: auto;
}

.cat-body,
.cat-ear {
  fill: #16231b;
  stroke: var(--gate-green);
  stroke-width: 3;
  stroke-linejoin: round;
}
.cat-tail,
.cat-face,
.cat-paw {
  fill: none;
  stroke: var(--gate-green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cat-eye { fill: var(--gate-green); }

.access-copy {
  text-align: center;
}

.access-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gate-green);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.access-copy h1 {
  margin: 0;
  color: var(--gate-text);
  font-family: inherit;
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.access-copy p {
  margin: 10px 0 0;
  color: var(--gate-muted);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.65;
}

.access-form {
  margin-top: 26px;
}

.access-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--gate-muted);
  font-size: 12px;
}

.access-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--gate-line);
  border-radius: 10px;
  background: #080d0a;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.access-input-row:focus-within {
  border-color: var(--gate-green);
  box-shadow: 0 0 0 3px var(--gate-green-soft);
}

.prompt-symbol {
  color: var(--gate-green);
  font-weight: 700;
}

.access-input-row input {
  width: 100%;
  min-width: 0;
  padding: 13px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gate-text);
  font: inherit;
  font-size: 15px;
}

.access-input-row input::placeholder {
  color: #526259;
}

.access-form button {
  width: 100%;
  margin-top: 12px;
  padding: 13px 16px;
  border: 1px solid var(--gate-green);
  border-radius: 10px;
  background: var(--gate-green);
  color: #071008;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}

.access-form button:hover { filter: brightness(1.05); }
.access-form button:active { transform: translateY(1px); }
.access-form button:focus-visible { outline: 3px solid rgba(86, 214, 123, 0.35); outline-offset: 3px; }

.access-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--gate-danger);
  font-size: 12px;
  text-align: center;
}

.access-terminal.denied {
  animation: access-shake 320ms ease;
}

.access-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--gate-line);
  color: var(--gate-muted);
  font-size: 11px;
}

.status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gate-green);
  box-shadow: 0 0 10px rgba(86, 214, 123, 0.7);
}

@keyframes access-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

@media (max-width: 560px) {
  .access-gate { padding: 14px; }
  .access-terminal-body { padding: 24px 20px 20px; }
  .cat-illustration { width: 150px; }
}
