/* EduSelf auth pages - login & institute code */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&display=swap');

:root {
  --auth-bg: oklch(0.48 0.09 256);
  --auth-glow-a: oklch(0.70 0.11 248 / 0.8);
  --auth-glow-b: oklch(0.60 0.09 274 / 0.8);
  --auth-card: oklch(0.99 0.003 262);
  --auth-card-foot: oklch(0.975 0.004 262);
  --auth-text: oklch(0.24 0.02 262);
  --auth-text-soft: oklch(0.50 0.015 262);
  --auth-label: oklch(0.38 0.015 262);
  --auth-border: oklch(0.88 0.008 262);
  --auth-rule: oklch(0.93 0.005 262);
  --auth-field: oklch(0.985 0.003 262);
  --auth-accent: oklch(0.55 0.15 252);
  --auth-accent-dark: oklch(0.42 0.13 258);
  --auth-btn: oklch(0.48 0.14 255);
  --auth-btn-hover: oklch(0.38 0.12 258);
  --auth-required: oklch(0.55 0.19 25);
  --auth-shadow: oklch(0.34 0.06 258 / 0.4);
  --auth-shadow-tight: oklch(0.34 0.06 258 / 0.14);
}

* { box-sizing: border-box; }

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

body {
  font-family: 'Instrument Sans', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--auth-text);
}

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--auth-bg);
  overflow: hidden;
}

/* Ambient background blobs */
.auth-page::before,
.auth-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.auth-page::before {
  width: 70vw; height: 70vw; top: -18vw; left: -12vw;
  background: radial-gradient(circle at 50% 50%, var(--auth-glow-a), transparent 65%);
  animation: auth-drift-a 22s ease-in-out infinite;
}
.auth-page::after {
  width: 60vw; height: 60vw; bottom: -20vw; right: -10vw;
  background: radial-gradient(circle at 50% 50%, var(--auth-glow-b), transparent 65%);
  animation: auth-drift-b 28s ease-in-out infinite;
}

@keyframes auth-drift-a {
  0%, 100% { transform: translate3d(-8%, -4%, 0) scale(1); }
  50% { transform: translate3d(10%, 6%, 0) scale(1.15); }
}
@keyframes auth-drift-b {
  0%, 100% { transform: translate3d(6%, 8%, 0) scale(1.1); }
  50% { transform: translate3d(-9%, -6%, 0) scale(0.95); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-page::before, .auth-page::after { animation: none; }
}

.auth-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-card {
  background: var(--auth-card);
  border-radius: 14px;
  box-shadow: 0 30px 70px -20px var(--auth-shadow), 0 2px 6px var(--auth-shadow-tight);
  overflow: hidden;
}

.auth-card__body { padding: 40px 40px 32px; }

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}
.auth-brand img { display: block; height: 40px; width: auto; }
.auth-brand__name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  color: oklch(0.30 0.05 262);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.auth-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.auth-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-label);
}
.auth-field .req { color: var(--auth-required); }
.auth-field__hint {
  font-size: 13px;
  line-height: 1.5;
  color: oklch(0.58 0.015 262);
}

.auth-input {
  height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--auth-text);
  background: var(--auth-field);
  border: 1px solid var(--auth-border);
  border-radius: 9px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.auth-input:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px oklch(0.55 0.15 252 / 0.18);
  background: #fff;
}
.auth-input--code { letter-spacing: 0.04em; }

.auth-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: oklch(0.45 0.015 262);
  cursor: pointer;
  user-select: none;
}
.auth-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: oklch(0.50 0.15 252);
  cursor: pointer;
}

.auth-btn {
  height: 48px;
  margin-top: 2px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--auth-card);
  background: var(--auth-btn);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
}
.auth-btn:hover { background: var(--auth-btn-hover); }
.auth-btn:active { transform: translateY(1px); }

.auth-card__foot {
  padding: 20px 40px;
  border-top: 1px solid var(--auth-rule);
  background: var(--auth-card-foot);
  text-align: center;
  font-size: 14px;
  color: var(--auth-text-soft);
}

.auth-copyright {
  text-align: center;
  font-size: 13px;
  color: oklch(0.99 0.003 262);
  opacity: 0.85;
}

a { color: var(--auth-accent); text-decoration: none; }
a:hover { color: var(--auth-accent-dark); }

@media (max-width: 520px) {
  .auth-card__body { padding: 32px 24px 26px; }
  .auth-card__foot { padding: 18px 24px; }
}
