/* Auth pages — login & register */
.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-media {
  position: relative;
  overflow: hidden;
  padding: 1.75rem 2rem;
}

.auth-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(18, 184, 158, 0.38), rgba(45, 143, 232, 0.32)),
    url("../images/banner/banner-bg.jpg") center/cover no-repeat;
}

.auth-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.2), transparent 45%);
}

.auth-media-inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
  color: #f8feff;
}

.auth-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: var(--vg-radius-pill);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.auth-media-title {
  font-family: var(--vg-font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.auth-media-text {
  font-size: 0.98rem;
  opacity: 0.92;
  line-height: 1.65;
}

.auth-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--vg-bg);
  overflow-y: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
}

.auth-brand-logo {
  height: 44px;
  width: auto;
  max-width: min(160px, 44vw);
  object-fit: contain;
}

.auth-back {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--vg-muted);
  transition: color 0.15s;
}

.auth-back:hover {
  color: var(--vg-primary);
}

.auth-form-wrap h1 {
  font-size: clamp(1.5rem, 3.5vw, 1.85rem);
  margin-bottom: 0.35rem;
  background: var(--vg-gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-lead {
  color: var(--vg-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vg-muted);
  margin-bottom: 0.35rem;
}

.auth-field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--vg-line-strong);
  border-radius: var(--vg-radius-sm);
  background: var(--vg-surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--vg-primary);
  box-shadow: 0 0 0 3px rgba(18, 184, 158, 0.14);
}

.auth-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem;
  font-size: 1rem;
}

.auth-foot {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--vg-muted);
}

.auth-foot a {
  color: var(--vg-accent);
  font-weight: 700;
}

.auth-err {
  color: var(--vg-coral);
  font-size: 0.84rem;
  min-height: 1.2em;
  margin-top: 0.35rem;
  font-weight: 600;
}

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

  .auth-media {
    min-height: 220px;
    padding: 1.5rem;
  }

  .auth-form-side {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .auth-media {
    min-height: 180px;
  }
}

/* Login / register legacy class aliases */
.page {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.side-media {
  position: relative;
  overflow: hidden;
  padding: 1.75rem 2rem;
}

.hero-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(18, 184, 158, 0.38), rgba(45, 143, 232, 0.32)),
    url("../images/banner/banner-bg.jpg") center/cover no-repeat;
}

.media-inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
  color: #f8feff;
}

.media-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: var(--vg-radius-pill);
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.media-title {
  font-family: var(--vg-font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.media-text {
  font-size: 0.98rem;
  opacity: 0.92;
}

.side-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow-y: auto;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.card h1 {
  font-size: clamp(1.5rem, 3.5vw, 1.85rem);
  margin-bottom: 0.35rem;
  background: var(--vg-gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card .sub {
  color: var(--vg-muted);
  margin-bottom: 1.5rem;
}

.field {
  margin-bottom: 1rem;
}

.row-actions {
  margin: 0.5rem 0 1rem;
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--vg-muted);
  cursor: pointer;
}

.card .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.err {
  display: none;
  margin-top: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--vg-radius-sm);
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.88rem;
}

.err.show {
  display: block;
}

.card .foot {
  margin-top: 1.25rem;
  color: var(--vg-muted);
  font-size: 0.88rem;
  text-align: left;
  padding: 0;
}

.card .foot::before {
  display: none;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .page {
    grid-template-columns: 1fr;
  }

  .side-media {
    min-height: 220px;
    padding: 1.5rem;
  }
}
