/*
 * English comment:
 * Shared auth-shell styling keeps login, signup, forgot-password, and
 * reset-password visually aligned without touching auth bootstrap logic.
 * The design intentionally borrows calm spacing and subtle semantic cues from
 * the landing page while staying quieter and more operational.
 */

:root {
  --auth-ink-strong: #121827;
  --auth-ink-soft: #5b6475;
  --auth-line: rgba(15, 23, 42, 0.06);
  --auth-line-strong: rgba(15, 23, 42, 0.12);
  --auth-shell-bg:
    radial-gradient(circle at top left, rgba(53, 92, 255, 0.10), transparent 34%),
    radial-gradient(circle at top right, rgba(244, 174, 66, 0.10), transparent 28%),
    linear-gradient(180deg, #f6f8fc 0%, #ffffff 24%, #f8fafc 100%);
  --auth-card-bg: rgba(255, 255, 255, 0.88);
  --auth-card-shadow: 0 24px 48px rgba(15, 23, 42, 0.10);
  --auth-primary: #355cff;
  --auth-primary-hover: #2c4ee0;
  --auth-source-bg: #eef4ff;
  --auth-source-border: #c6d7ff;
  --auth-derived-bg: #eefbf3;
  --auth-derived-border: #b5ebc9;
  --auth-place-bg: #fff5e6;
  --auth-place-border: #f1d39d;
}

body.auth-page {
  min-height: 100vh;
  background: var(--auth-shell-bg);
  color: var(--auth-ink-strong);
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(53, 92, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(53, 92, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 92%);
}

.auth-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.auth-aside {
  display: none;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  padding: 3rem;
}

.auth-aside::after {
  content: "";
  position: absolute;
  inset: 2rem;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.30), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.auth-aside-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: calc(100vh - 6rem);
  flex-direction: column;
  justify-content: space-between;
  border-radius: 2rem;
  padding: 2rem;
}

.auth-brand-mark {
  display: inline-flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 1.25rem;
  background: var(--auth-primary);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(53, 92, 255, 0.24);
}

.auth-brand-copy {
  margin-top: 1.25rem;
  max-width: 24rem;
}

.auth-brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--auth-primary);
}

.auth-brand-kicker::before {
  content: "";
  display: inline-block;
  height: 1px;
  width: 2rem;
  background: currentColor;
}

.auth-brand-title {
  margin-top: 1rem;
  max-width: 24rem;
  font-size: clamp(2rem, 2.8vw, 3rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.auth-brand-support {
  margin-top: 1rem;
  max-width: 22rem;
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--auth-ink-soft);
}

.auth-visual-stack {
  display: grid;
  gap: 0.9rem;
  max-width: 24rem;
}

.auth-visual-card {
  border-radius: 1.4rem;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: 1rem 1rem 1rem 1.05rem;
}

.auth-visual-card[data-card-tone="source"] {
  background: var(--auth-source-bg);
  border-color: var(--auth-source-border);
}

.auth-visual-card[data-card-tone="derived"] {
  background: var(--auth-derived-bg);
  border-color: var(--auth-derived-border);
}

.auth-visual-card[data-card-tone="place"] {
  background: var(--auth-place-bg);
  border-color: var(--auth-place-border);
}

.auth-visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.auth-visual-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.35rem 0.72rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-visual-meta {
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.52);
}

.auth-visual-title {
  margin-top: 0.85rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.auth-visual-line {
  margin-top: 0.45rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: rgba(15, 23, 42, 0.68);
}

.auth-panel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-panel {
  position: relative;
  width: 100%;
  max-width: 33rem;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: var(--auth-card-bg);
  box-shadow: var(--auth-card-shadow);
  backdrop-filter: blur(18px);
  padding: 1.5rem;
}

.auth-panel-inner {
  border-radius: 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  padding: 1.4rem;
}

.auth-top-mark {
  display: inline-flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: #ffffff;
  color: var(--auth-primary);
  border: 1px solid rgba(53, 92, 255, 0.16);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.auth-title {
  margin-top: 1.4rem;
  font-size: clamp(2rem, 3vw, 2.65rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.auth-subtitle {
  margin-top: 0.85rem;
  max-width: 28rem;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--auth-ink-soft);
}

.auth-provider-row {
  margin-top: 1.45rem;
  display: grid;
  gap: 0.75rem;
}

.auth-provider-button,
.auth-secondary-button {
  display: inline-flex;
  min-height: 3rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.88);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--auth-ink-strong);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-provider-button:hover,
.auth-secondary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(53, 92, 255, 0.18);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.auth-provider-button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.auth-divider {
  position: relative;
  margin: 1.35rem 0;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--auth-line);
}

.auth-divider span {
  position: relative;
  display: inline-block;
  background: rgba(255, 255, 255, 0.96);
  padding: 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.46);
}

.auth-form {
  display: grid;
  gap: 0.95rem;
}

.auth-field {
  width: 100%;
  min-height: 3.35rem;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.92rem 1rem;
  font-size: 0.96rem;
  color: var(--auth-ink-strong);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-field::placeholder {
  color: rgba(15, 23, 42, 0.42);
}

.auth-field:focus {
  border-color: rgba(53, 92, 255, 0.34);
  box-shadow: 0 0 0 4px rgba(53, 92, 255, 0.10);
  background: #ffffff;
}

.auth-primary-button {
  display: inline-flex;
  min-height: 3.25rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--auth-primary);
  padding: 0.9rem 1.15rem;
  font-size: 0.97rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(53, 92, 255, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-primary-button:hover {
  transform: translateY(-1px);
  background: var(--auth-primary-hover);
  box-shadow: 0 18px 30px rgba(53, 92, 255, 0.28);
}

.auth-helper-row {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.auth-inline-link {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--auth-ink-strong);
  text-decoration: none;
}

.auth-inline-link:hover {
  color: var(--auth-primary);
}

.auth-inline-link-muted {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.62);
}

.auth-inline-link-muted:hover {
  color: var(--auth-ink-strong);
}

.auth-bottom {
  margin-top: 1.5rem;
  border-top: 1px solid var(--auth-line);
  padding-top: 1.4rem;
}

.auth-bottom-caption {
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.48);
}

.auth-checkbox-row {
  margin-top: 0.35rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  border-radius: 1rem;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.74);
  padding: 1rem 1rem 0.95rem;
}

.auth-checkbox-copy {
  font-size: 0.84rem;
  line-height: 1.72;
  color: rgba(15, 23, 42, 0.60);
}

.auth-notice {
  margin-bottom: 1rem;
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

@media (min-width: 1024px) {
  .auth-aside {
    display: block;
  }

  .auth-panel-wrap {
    padding: 2rem 2.5rem;
  }

  .auth-panel {
    max-width: 35rem;
    padding: 1.75rem;
  }

  .auth-panel-inner {
    padding: 1.75rem;
  }
}

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

  .auth-panel-wrap {
    padding: 1.25rem 1rem 2rem;
  }
}

@media (max-width: 640px) {
  .auth-panel {
    border-radius: 1.5rem;
    padding: 0.95rem;
  }

  .auth-panel-inner {
    border-radius: 1.15rem;
    padding: 1rem;
  }

  .auth-title {
    margin-top: 1rem;
    font-size: 1.8rem;
  }

  .auth-subtitle {
    margin-top: 0.72rem;
    font-size: 0.92rem;
    line-height: 1.62;
  }

  .auth-provider-row {
    margin-top: 1.2rem;
    gap: 0.65rem;
  }

  .auth-divider {
    margin: 1.1rem 0;
  }

  .auth-field {
    min-height: 3.2rem;
  }

  .auth-primary-button,
  .auth-provider-button,
  .auth-secondary-button {
    min-height: 3.05rem;
  }

  .auth-helper-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
