/* AdKey login — shared design tokens (also mirrored in frontend/src/styles/tokens.css) */
:root {
  --ak-bg-0: #0b1014;
  --ak-bg-1: #121a21;
  --ak-bg-2: #1a2630;
  --ak-ink: #e8eef3;
  --ak-muted: #8fa3b3;
  --ak-line: rgba(232, 238, 243, 0.12);
  --ak-accent: #3ecf8e;
  --ak-accent-dim: rgba(62, 207, 142, 0.16);
  --ak-danger: #ff6b6b;
  --ak-danger-bg: rgba(255, 107, 107, 0.12);
  --ak-font: "Sora", system-ui, sans-serif;
  --ak-font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ak-radius: 14px;
  --ak-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body.login-page {
  font-family: var(--ak-font);
  color: var(--ak-ink);
  background: var(--ak-bg-0);
  min-height: 100vh;
  display: grid;
  place-items: stretch;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
}

.login-visual {
  position: relative;
  padding: clamp(2rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(62, 207, 142, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(56, 140, 180, 0.18), transparent 50%),
    linear-gradient(160deg, #0b1014 0%, #152029 45%, #0e161c 100%);
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 238, 243, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 238, 243, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

.login-visual-inner {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.login-brand {
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 1rem;
}

.login-brand span {
  color: var(--ak-accent);
}

.login-tagline {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ak-muted);
  max-width: 28rem;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--ak-bg-1);
  border-left: 1px solid var(--ak-line);
}

.login-card {
  width: 100%;
  max-width: 24rem;
  padding: 2rem;
  border-radius: var(--ak-radius);
  background: rgba(26, 38, 48, 0.72);
  border: 1px solid var(--ak-line);
  box-shadow: var(--ak-shadow);
  backdrop-filter: blur(10px);
}

.login-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-card .login-sub {
  margin: 0 0 1.5rem;
  color: var(--ak-muted);
  font-size: 0.925rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ak-muted);
}

.login-form input {
  font-family: var(--ak-font);
  font-size: 1rem;
  color: var(--ak-ink);
  background: var(--ak-bg-0);
  border: 1px solid var(--ak-line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-form input:focus {
  border-color: var(--ak-accent);
  box-shadow: 0 0 0 3px var(--ak-accent-dim);
}

.login-submit {
  margin-top: 0.5rem;
  font-family: var(--ak-font);
  font-size: 1rem;
  font-weight: 600;
  color: #062216;
  background: var(--ak-accent);
  border: none;
  border-radius: 10px;
  padding: 0.95rem 1.25rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.login-submit:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(0);
}

.login-error {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--ak-danger-bg);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ffc9c9;
  font-size: 0.9rem;
  line-height: 1.4;
}

.login-meta {
  margin-top: 1.5rem;
  font-family: var(--ak-font-mono);
  font-size: 0.7rem;
  color: rgba(143, 163, 179, 0.7);
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 38vh;
    justify-content: flex-end;
    padding-bottom: 2rem;
  }

  .login-panel {
    border-left: none;
    border-top: 1px solid var(--ak-line);
    align-items: flex-start;
    padding-top: 2rem;
  }
}
