/* Admin authentication — forensic lab aesthetic */

@import "forensic.css";

.admin-auth {
  --auth-border-focus: rgba(56, 189, 248, 0.55);

  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--fw-bg);
  color: var(--fw-text);
  font-family: var(--fw-font-display);
}

.admin-auth__shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  width: min(960px, 100%);
  border: 1px solid var(--fw-border);
  border-radius: calc(var(--fw-radius) + 4px);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 24px 80px rgba(0, 0, 0, 0.55);
  animation: auth-shell-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-shell-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

.admin-auth__brand {
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--fw-surface);
  border-right: 1px solid var(--fw-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
}

.admin-auth__brand::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fw-accent), var(--fw-warm));
}

.admin-auth__title {
  margin: 0.5rem 0 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.admin-auth__tagline {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--fw-text-muted);
  max-width: 28ch;
}

.admin-auth__meta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-family: var(--fw-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--fw-text-muted);
}

.admin-auth__meta dt {
  color: var(--fw-text-muted);
  opacity: 0.7;
}

.admin-auth__meta dd {
  margin: 0;
  color: var(--fw-text);
}

.admin-auth__panel {
  padding: clamp(2rem, 5vw, 2.75rem);
  background: var(--fw-surface-raised);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.admin-auth__panel-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.admin-auth__panel-header p {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--fw-text-muted);
}

.admin-auth__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-auth__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-auth__field label {
  font-family: var(--fw-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fw-text-muted);
}

.admin-auth__field input[type="email"],
.admin-auth__field input[type="password"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--fw-font-mono);
  font-size: 0.9rem;
  color: var(--fw-text);
  background: var(--fw-bg);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.admin-auth__field input::placeholder {
  color: var(--fw-text-muted);
  opacity: 0.5;
}

.admin-auth__field input:hover {
  border-color: rgba(148, 163, 184, 0.28);
}

.admin-auth__field input:focus {
  border-color: var(--fw-border-focus);
  box-shadow: 0 0 0 3px var(--fw-accent-dim);
  background: #0d1015;
}

.admin-auth__remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--fw-text-muted);
  cursor: pointer;
}

.admin-auth__remember input {
  accent-color: var(--fw-accent);
  width: 1rem;
  height: 1rem;
}

.admin-auth__submit {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-family: var(--fw-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fw-bg);
  background: linear-gradient(135deg, var(--fw-accent) 0%, #0ea5e9 100%);
  border: none;
  border-radius: var(--fw-radius);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
  box-shadow: 0 4px 24px rgba(56, 189, 248, 0.25);
}

.admin-auth__submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 32px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.admin-auth__submit:active {
  transform: translateY(0);
}

.admin-auth__flash {
  margin: 0;
  padding: 0.7rem 0.9rem;
  font-family: var(--fw-font-mono);
  font-size: 0.8rem;
  border-radius: var(--fw-radius);
  animation: auth-flash-in 0.4s ease both;
}

@keyframes auth-flash-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.admin-auth__flash--notice {
  background: var(--fw-accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--fw-accent);
}

.admin-auth__flash--alert {
  background: var(--fw-danger-bg);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--fw-danger);
}

.admin-auth #error_explanation {
  padding: 0.85rem 1rem;
  background: var(--fw-danger-bg);
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: var(--fw-radius);
  animation: auth-flash-in 0.4s ease both;
}

.admin-auth #error_explanation h2 {
  margin: 0 0 0.5rem;
  font-family: var(--fw-font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fw-danger);
}

.admin-auth #error_explanation ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--fw-text);
}

.admin-auth__links {
  padding-top: 0.5rem;
  border-top: 1px solid var(--fw-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.admin-auth__links p {
  margin: 0;
}

.admin-auth__links a {
  font-family: var(--fw-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--fw-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.admin-auth__links a:hover {
  color: var(--fw-accent);
}

@media (max-width: 720px) {
  .admin-auth__shell {
    grid-template-columns: 1fr;
  }

  .admin-auth__brand {
    border-right: none;
    border-bottom: 1px solid var(--fw-border);
    padding-bottom: 1.75rem;
  }

  .admin-auth__meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem 2rem;
  }
}
