/* Sentinel Systems — authentication experience (sign in / create account)
   Scoped entirely under .auth-shell so no other page is affected. */

.auth-shell {
  --auth-radius: 20px;
  --auth-field: rgba(9, 16, 32, .58);
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.6rem, 4vw, 3.4rem) 1.15rem clamp(2.6rem, 5vw, 4rem);
}

/* ---------- ambient background ---------- */
.auth-aurora {
  position: absolute;
  inset: -18% -6% auto -6%;
  height: 130%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  mask-image: radial-gradient(78% 70% at 50% 34%, #000 42%, transparent 100%);
}
.auth-aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: .55;
  will-change: transform;
}
.auth-aurora span:nth-child(1) {
  width: 42vw; height: 42vw; left: -8vw; top: 4vw;
  background: radial-gradient(circle, rgba(59,130,246,.55), transparent 68%);
  animation: auth-drift-a 22s var(--ease, ease-in-out) infinite alternate;
}
.auth-aurora span:nth-child(2) {
  width: 34vw; height: 34vw; right: -6vw; top: -4vw;
  background: radial-gradient(circle, rgba(96,165,250,.4), transparent 68%);
  animation: auth-drift-b 26s var(--ease, ease-in-out) infinite alternate;
}
.auth-aurora span:nth-child(3) {
  width: 30vw; height: 30vw; right: 12vw; bottom: -8vw;
  background: radial-gradient(circle, rgba(37,99,235,.34), transparent 70%);
  animation: auth-drift-a 30s var(--ease, ease-in-out) infinite alternate-reverse;
}
.auth-grid-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148,178,226,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,178,226,.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(62% 58% at 50% 38%, #000, transparent 100%);
}
@keyframes auth-drift-a {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(4%, 6%, 0) scale(1.12); }
}
@keyframes auth-drift-b {
  from { transform: translate3d(0,0,0) scale(1.08); }
  to   { transform: translate3d(-5%, 4%, 0) scale(1); }
}

/* ---------- left: brand pitch ---------- */
.auth-pitch {
  position: relative;
  z-index: 1;
  max-width: 520px;
  animation: auth-rise .7s var(--ease, ease-out) both;
}
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem .35rem .55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(59,130,246,.1);
  color: var(--text-muted);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
}
.auth-eyebrow i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(52,211,153,.16);
  animation: auth-pulse 2.4s ease-in-out infinite;
}
@keyframes auth-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52,211,153,.18); }
  50%      { box-shadow: 0 0 0 7px rgba(52,211,153,.04); }
}
.auth-pitch h1 {
  margin: 1.1rem 0 .8rem;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -.02em;
  line-height: 1.08;
}
.auth-pitch h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #7dabff, #3b82f6 55%, #a5c6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-pitch > p {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 44ch;
}
.auth-points {
  list-style: none;
  margin: 1.6rem 0 0;
  display: grid;
  gap: .7rem;
}
.auth-points li {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: .93rem;
}
.auth-points svg {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin-top: .1rem;
  color: var(--brand);
}
.auth-points strong { color: var(--text); font-weight: 600; }
.auth-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.auth-stats div span {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.auth-stats div small {
  color: var(--text-dim);
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- right: the card ---------- */
.auth-panel {
  position: relative;
  z-index: 1;
  animation: auth-rise .75s var(--ease, ease-out) .08s both;
}
.auth-card-pro {
  position: relative;
  padding: clamp(1.5rem, 2.4vw, 2.1rem);
  border-radius: var(--auth-radius);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(22,35,60,.86), rgba(13,21,38,.92));
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(16px);
  overflow: hidden;
}
.auth-card-pro::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(125,171,255,.5), transparent 38%, transparent 62%, rgba(59,130,246,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.auth-brandline {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.25rem;
}
.auth-brandline img {
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.auth-brandline b {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  letter-spacing: -.01em;
}
.auth-brandline small {
  display: block;
  color: var(--text-dim);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* segmented tabs with sliding pill */
.auth-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem;
  padding: .3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(9,16,32,.6);
  margin-bottom: 1.35rem;
}
.auth-switch a {
  position: relative;
  z-index: 1;
  padding: .58rem .5rem;
  border-radius: 999px;
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .25s var(--ease, ease);
}
.auth-switch a:hover { color: var(--text); }
.auth-switch a[aria-selected="true"] { color: #fff; }
.auth-switch .auth-switch-pill {
  position: absolute;
  z-index: 0;
  top: .3rem; bottom: .3rem;
  left: .3rem;
  width: calc(50% - .3rem);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 12px 26px -14px var(--brand);
  transition: transform .38s var(--ease, ease);
}
.auth-switch[data-mode="register"] .auth-switch-pill { transform: translateX(100%); }

.auth-title { margin-bottom: 1.2rem; }
.auth-title h2 { font-size: 1.4rem; letter-spacing: -.015em; margin-bottom: .3rem; }
.auth-title p { color: var(--text-muted); font-size: .9rem; }

.auth-alert {
  display: grid;
  gap: .3rem;
  margin-bottom: 1.15rem;
  padding: .8rem .9rem;
  border-radius: 12px;
  border: 1px solid rgba(248,113,113,.34);
  background: rgba(248,113,113,.1);
  color: #ffd9d9;
  font-size: .87rem;
  animation: auth-shake .45s var(--ease, ease);
}
.auth-alert span { display: block; }
@keyframes auth-shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  45% { transform: translateX(4px); }
  70% { transform: translateX(-2px); }
}

/* fields */
.auth-form-pro { display: grid; gap: .95rem; }
.auth-field { position: relative; }
.auth-field > label {
  display: block;
  margin-bottom: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .01em;
}
.auth-field > label .dim { color: var(--text-dim); font-weight: 500; }
.auth-input-wrap { position: relative; display: block; }
.auth-input-wrap > svg {
  position: absolute;
  left: .85rem; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-dim);
  pointer-events: none;
  transition: color .2s var(--ease, ease);
}
.auth-shell .auth-input-wrap > input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]) {
  width: 100%;
  padding: .82rem .95rem .82rem 2.6rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--auth-field);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
  transition: border-color .2s var(--ease, ease), box-shadow .2s var(--ease, ease), background-color .2s var(--ease, ease);
}
.auth-shell .auth-input-wrap > input::placeholder { color: #5a6b8c; }
.auth-shell .auth-input-wrap > input:hover { border-color: var(--line-strong); }
.auth-shell .auth-input-wrap > input:focus {
  outline: none;
  border-color: rgba(59,130,246,.7);
  background: rgba(9,16,32,.78);
  box-shadow: 0 0 0 4px rgba(59,130,246,.16);
}
.auth-input-wrap:focus-within > svg { color: var(--brand); }
.auth-shell .auth-input-wrap.has-toggle > input { padding-right: 3.6rem; }
.auth-shell .password-toggle {
  position: absolute;
  right: .45rem; top: 50%;
  transform: translateY(-50%);
  padding: .35rem .55rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s var(--ease, ease), background-color .2s var(--ease, ease);
}
.auth-shell .password-toggle:hover { color: var(--text); background: rgba(148,178,226,.12); }

.auth-hint { margin-top: .4rem; font-size: .78rem; color: var(--text-dim); }
.auth-caps {
  display: none;
  margin-top: .4rem;
  font-size: .78rem;
  color: var(--warn);
}
.auth-caps.is-on { display: block; }

/* strength meter */
.auth-strength { margin-top: .55rem; }
.auth-strength-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .3rem;
}
.auth-strength-bar i {
  height: 4px;
  border-radius: 99px;
  background: rgba(148,178,226,.16);
  transition: background-color .3s var(--ease, ease);
}
.auth-strength-text {
  margin-top: .35rem;
  font-size: .76rem;
  color: var(--text-dim);
  letter-spacing: .02em;
}
.auth-strength[data-score="1"] i:nth-child(-n+1) { background: var(--bad); }
.auth-strength[data-score="2"] i:nth-child(-n+2) { background: var(--warn); }
.auth-strength[data-score="3"] i:nth-child(-n+3) { background: #60a5fa; }
.auth-strength[data-score="4"] i { background: var(--ok); }

.auth-match { margin-top: .4rem; font-size: .78rem; color: var(--text-dim); }
.auth-match.is-ok { color: var(--ok); }
.auth-match.is-bad { color: var(--bad); }

/* terms checkbox */
.auth-terms {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: .8rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(9,16,32,.42);
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.55;
  transition: border-color .2s var(--ease, ease), background-color .2s var(--ease, ease);
  cursor: pointer;
}
.auth-terms:hover { border-color: var(--line-strong); background: rgba(9,16,32,.6); }
.auth-terms input {
  flex: 0 0 auto;
  margin-top: .18rem;
  width: 16px; height: 16px;
  accent-color: var(--brand);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  font-size: .84rem;
}
.auth-row a { font-weight: 600; }

/* buttons */
.auth-submit {
  position: relative;
  width: 100%;
  margin-top: .25rem;
  padding: .9rem 1.1rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: .96rem;
  letter-spacing: .01em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 18px 34px -18px rgba(59,130,246,.9);
  transition: transform .18s var(--ease, ease), box-shadow .25s var(--ease, ease), filter .2s var(--ease, ease);
}
.auth-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.28), transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease, ease);
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 24px 44px -20px rgba(59,130,246,.95); }
.auth-submit:hover::after { transform: translateX(120%); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:focus-visible { outline: 2px solid #a5c6ff; outline-offset: 3px; }
.auth-submit[data-loading="true"] { pointer-events: none; filter: saturate(.75); }
.auth-submit .auth-spinner {
  display: none;
  width: 15px; height: 15px;
  margin-right: .5rem;
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: auth-spin .7s linear infinite;
}
.auth-submit[data-loading="true"] .auth-spinner { display: inline-block; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-or {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 1.25rem 0;
  color: var(--text-dim);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.auth-or::before, .auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.auth-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: .85rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(88,101,242,.45);
  background: rgba(88,101,242,.14);
  color: #dfe3ff;
  font-weight: 600;
  font-size: .93rem;
  transition: background-color .2s var(--ease, ease), transform .18s var(--ease, ease), border-color .2s var(--ease, ease);
}
.auth-discord:hover {
  background: rgba(88,101,242,.26);
  border-color: rgba(88,101,242,.7);
  color: #fff;
  transform: translateY(-1px);
}
.auth-discord svg { width: 20px; height: 20px; }

.auth-foot-note {
  margin-top: 1.15rem;
  text-align: center;
  font-size: .86rem;
  color: var(--text-muted);
}
.auth-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin-top: 1rem;
  color: var(--text-dim);
  font-size: .78rem;
}
.auth-secure svg { width: 14px; height: 14px; }

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; padding-top: 1.6rem; }
  .auth-pitch { max-width: 640px; }
  .auth-pitch h1 { font-size: clamp(1.8rem, 6vw, 2.3rem); }
  .auth-points, .auth-stats { display: none; }
  .auth-panel { max-width: 520px; width: 100%; }
}
@media (max-width: 520px) {
  .auth-card-pro { padding: 1.25rem 1.05rem 1.4rem; }
  .auth-pitch > p { font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-aurora span, .auth-eyebrow i { animation: none; }
  .auth-pitch, .auth-panel { animation: none; }
  .auth-submit::after { display: none; }
  .auth-switch .auth-switch-pill { transition: none; }
}
