/*
 * Vault Entrance Auth Surface
 * TICKET-AUTH-002
 */

.tk-auth {
  min-height: 100vh;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem 4rem;
  display: block;
  background:
    radial-gradient(circle at 15% 20%, rgba(39, 45, 65, 0.55), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(90, 60, 120, 0.25), transparent 50%),
    linear-gradient(135deg, rgba(9, 11, 17, 0.95), rgba(5, 6, 10, 0.95));
  position: relative;
  overflow: hidden;
}

.tk-auth .tk-texture-layer__overlay {
  min-height: inherit;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tk-auth.tk-texture-layer {
  --tk-texture-silk: repeating-linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.02) 2px,
    rgba(255, 255, 255, 0.00) 6px
  );
  --tk-texture-opacity: 0.05;
  --tk-texture-blend: overlay;
}

.tk-auth__frame {
  width: min(400px, 90vw);
  position: relative;
}

.tk-auth__card {
  background: hsla(220, 12%, 10%, 0.7);
  backdrop-filter: blur(25px);
  border: 1px solid hsla(0, 0%, 100%, 0.05);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  padding: 2.2rem 2rem 2.4rem;
  color: var(--tk-ink-100, #f5f5f7);
  position: relative;
  overflow: hidden;
}

.tk-auth__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  opacity: 0.35;
  pointer-events: none;
}

.tk-auth__header,
.tk-auth__tabs,
.tk-auth__panels {
  position: relative;
  z-index: 1;
}

.tk-auth__eyebrow {
  font-family: var(--tk-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.6rem;
}

.tk-auth__title {
  font-family: var(--tk-font-display);
  font-size: 1.8rem;
  margin: 0 0 0.4rem;
}

.tk-auth__sub {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 1.6rem;
}

.tk-auth__tabs {
  display: flex;
  gap: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

.tk-auth__tab {
  position: relative;
  padding-bottom: 0.6rem;
  font-family: var(--tk-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-lavender);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tk-auth__tab.is-active {
  color: var(--electric-pink);
}

.tk-auth__tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--electric-pink);
  box-shadow: var(--electric-pink-glow);
}

.tk-auth__panel[hidden] {
  display: none;
}

.tk-auth__form {
  display: grid;
  gap: 1.1rem;
}

.tk-auth__field label {
  display: block;
  font-family: var(--tk-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.45rem;
}

.tk-auth__field input {
  width: 100%;
  padding: 0.85rem 0.9rem;
  background: rgba(12, 14, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #f7f7fa;
  font-family: var(--tk-font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tk-auth__field input:focus {
  outline: none;
  border-color: var(--electric-pink);
  box-shadow: 0 0 0 3px rgba(var(--electric-pink-rgb), 0.15), var(--electric-pink-glow);
  background: rgba(15, 18, 28, 0.9);
}

.tk-auth__field input.error {
  border-color: rgba(220, 53, 69, 0.9);
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.tk-auth__field small {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.tk-auth__checkbox {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
}

.tk-auth__checkbox input {
  margin-top: 0.2rem;
  accent-color: var(--electric-pink);
}

.tk-auth__checkbox a {
  color: var(--electric-pink);
  text-decoration: none;
}

.tk-auth__checkbox a:hover {
  text-decoration: underline;
}

.tk-auth__submit {
  margin-top: 0.4rem;
  width: 100%;
  border: none;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: var(--electric-pink);
  color: #0b0b0d;
  font-family: var(--tk-font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35), var(--electric-pink-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tk-auth__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4), var(--electric-pink-glow);
}

.tk-auth__footer {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.85rem;
}

.tk-auth__footer-sep {
  margin: 0 0.4rem;
  color: rgba(255, 255, 255, 0.35);
}

.tk-auth__footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.tk-auth__footer a:hover {
  color: var(--electric-pink);
}

.tk-auth__message {
  margin-bottom: 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  background: rgba(20, 24, 36, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tk-auth__message--error {
  border-color: rgba(220, 53, 69, 0.4);
  color: #ff9da7;
}

.tk-auth__message--success {
  border-color: rgba(38, 198, 218, 0.4);
  color: #b8f4ff;
}

.tk-auth__note {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.tk-auth__support {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

.tk-auth__support a {
  color: var(--electric-pink);
  text-decoration: underline;
  text-decoration-color: rgba(var(--electric-pink-rgb), 0.4);
  text-underline-offset: 2px;
}

.tk-auth__support a:hover {
  text-decoration-color: var(--electric-pink);
}

.tk-auth__terminal {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 18, 0.85);
  font-family: var(--tk-font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b8f4ff;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.35);
}

.tk-auth__terminal-line {
  margin: 0 0 0.45rem;
  opacity: 0.2;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.tk-auth__terminal-line:last-child {
  margin-bottom: 0;
}

.tk-auth__terminal-line.is-active {
  opacity: 1;
  color: var(--electric-pink);
  text-shadow: 0 0 18px rgba(var(--electric-pink-rgb), 0.55);
}

.tk-auth__error-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}

.tk-auth__error-list li {
  margin: 0;
}

.field-error-message {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: #ff9da7;
}

.tk-auth__trust {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  position: relative;
  z-index: 1;
}

.tk-auth__trust-lead {
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.78);
}

.tk-auth__trust-body {
  margin: 0;
}

.tk-auth__trust a {
  color: var(--electric-pink);
  text-decoration: none;
}

.tk-auth__trust a:hover {
  text-decoration: underline;
}

@supports not (backdrop-filter: blur(2px)) {
  .tk-auth__card {
    background: rgba(10, 12, 18, 0.95);
  }
}

@media (max-width: 600px) {
  .tk-auth {
    padding: 2rem 1rem 3.5rem;
  }

  .tk-auth__card {
    padding: 2rem 1.5rem 2.2rem;
  }

  .tk-auth__tabs {
    gap: 0.8rem;
  }

  .tk-auth__title {
    font-size: 1.6rem;
  }
}
