:root {
  --auth-ink: #171315;
  --auth-muted: #746c70;
  --auth-line: #eadfe1;
  --auth-red: #f20d0d;
  --auth-soft: #fff7f7;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(242, 13, 13, .09), transparent 30rem),
    radial-gradient(circle at 90% 85%, rgba(255, 185, 185, .22), transparent 28rem),
    #f8f6f6;
}

.auth-brandbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(234, 223, 225, .85);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--auth-ink);
  text-decoration: none;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 850;
  letter-spacing: -.035em;
}

.auth-brand img { width: 68px; height: 68px; object-fit: contain; margin-right: -12px; }

.auth-stage {
  width: min(100% - 2rem, 1080px);
  min-height: calc(100vh - 77px);
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 5rem) 0;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 460px);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(234, 223, 225, .95);
  border-radius: 26px;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 80px rgba(55, 27, 31, .12);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--auth-red), #ff8d8d 70%, transparent);
}

.auth-card__intro { text-align: center; margin-bottom: 1.75rem; }
.auth-card__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--auth-red);
  background: #fff0f0;
  box-shadow: inset 0 0 0 1px #ffd6d6;
}
.auth-card__icon .material-symbols-outlined,
.auth-card__icon .material-icons-outlined { font-size: 30px; }
.auth-card h1 { margin: 0; font-size: clamp(1.65rem, 5vw, 2.15rem); line-height: 1.1; font-weight: 900; letter-spacing: -.045em; }
.auth-card__intro p { margin: .65rem auto 0; max-width: 35ch; color: var(--auth-muted); font-size: .92rem; line-height: 1.6; }

.auth-form { display: grid; gap: 1rem; }
.auth-field { display: grid; gap: .45rem; }
.auth-field label, label.auth-field { color: #51494d; font-size: .76rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.auth-field input {
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  border: 1px solid #ddd2d5;
  border-radius: 13px;
  padding: .85rem 1rem;
  color: var(--auth-ink);
  background: #fff;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.auth-field input:focus { border-color: var(--auth-red); box-shadow: 0 0 0 4px rgba(242, 13, 13, .1); }
.auth-password { position: relative; }
.auth-password input { padding-right: 3.25rem; }
.auth-password__toggle {
  position: absolute;
  right: .35rem;
  bottom: .2rem;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #6f666a;
  background: transparent;
}
.auth-password__toggle:hover { color: var(--auth-red); background: #fff2f2; }

.auth-submit, .auth-action {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: 13px;
  padding: .85rem 1.2rem;
  color: #fff;
  background: var(--auth-red);
  box-shadow: 0 12px 28px rgba(242, 13, 13, .21);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-submit:hover, .auth-action:hover { transform: translateY(-1px); background: #ce0909; box-shadow: 0 16px 32px rgba(242, 13, 13, .26); }
.auth-submit:disabled { cursor: wait; opacity: .72; }
.auth-action--dark { background: #191517; box-shadow: 0 12px 28px rgba(25, 21, 23, .18); }
.auth-action--dark:hover { background: #30292c; }
.auth-card__meta { margin-top: 1.4rem; color: var(--auth-muted); text-align: center; font-size: .88rem; }
.auth-card__meta a, .auth-inline-link { color: var(--auth-red); font-weight: 750; text-decoration: none; }
.auth-card__meta a:hover, .auth-inline-link:hover { text-decoration: underline; }

.auth-notice {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  border: 1px solid;
  border-radius: 13px;
  padding: .8rem .9rem;
  font-size: .85rem;
  line-height: 1.5;
}
.auth-notice--error { color: #a71919; border-color: #ffcaca; background: #fff1f1; }
.auth-notice--success { color: #176b3a; border-color: #bde9ce; background: #edfff4; }
.auth-notice--info { color: #205b8a; border-color: #c8e2f6; background: #f0f8ff; }
.auth-notice .material-icons-outlined { font-size: 20px; flex: 0 0 auto; }

.auth-page.is-ui-ready .auth-card { animation: auth-card-in .42s cubic-bezier(.2,.8,.2,1) both; }
.auth-submit__spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: auth-spin .7s linear infinite; }
@keyframes auth-card-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .auth-stage { width: min(100% - 1rem, 1080px); padding: 1.25rem 0 2rem; }
  .auth-card { border-radius: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-page.is-ui-ready .auth-card { animation: none; }
  .auth-submit, .auth-action, .auth-field input { transition: none; }
}
