/* ============================================================
   Grey Matter Edu — Login page (uses tokens/buttons from styles.css)
   ============================================================ */
.auth-body { min-height: 100vh; overflow-x: hidden; }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ---------- Brand / showcase panel ---------- */
.auth-brand {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 5vw, 66px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  border-right: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(255,122,26,0.13), rgba(10,14,39,0.55));
}
.auth-brand::before {
  content: ""; position: absolute; width: 440px; height: 440px; top: -90px; right: -130px;
  border-radius: 50%; filter: blur(70px);
  background: radial-gradient(circle, rgba(255,122,26,0.32), transparent 65%);
}
.auth-brand::after {
  content: ""; position: absolute; width: 400px; height: 400px; bottom: -110px; left: -110px;
  border-radius: 50%; filter: blur(85px);
  background: radial-gradient(circle, rgba(52,86,204,0.30), transparent 65%);
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .brand { align-self: flex-start; }
.auth-brand-body h1 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); margin: 16px 0 14px; }
.auth-brand-body > p { color: var(--muted); max-width: 430px; margin-bottom: 28px; font-size: 1.02rem; }
.auth-points { list-style: none; display: grid; gap: 14px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-size: 0.98rem; color: #dfe5f5; }
.auth-brand-foot {
  font-family: "Sora", sans-serif; letter-spacing: 0.2em; text-transform: uppercase;
  font-size: 0.72rem; color: var(--muted-2);
}

/* ---------- Form panel ---------- */
.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(24px, 5vw, 56px);
}
.auth-card {
  position: relative;
  width: min(440px, 100%);
  background: rgba(12, 17, 38, 0.72);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
}
.auth-back { display: inline-block; color: var(--muted); font-size: 0.86rem; margin-bottom: 20px; transition: color 0.25s; }
.auth-back:hover { color: var(--orange-2); }
.auth-card-logo { display: none; margin-bottom: 18px; }
.auth-card h2 { font-size: 1.7rem; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 26px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 500; color: #c3ccea; margin-bottom: 8px; }
.auth-input {
  width: 100%; padding: 14px 44px 14px 16px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--stroke);
  color: var(--text); font-family: inherit; font-size: 0.98rem;
  transition: border-color 0.25s, background 0.25s;
}
.field:not(.pw) .auth-input { padding-right: 16px; }
.auth-input::placeholder { color: var(--muted-2); }
.auth-input:focus { outline: none; border-color: var(--orange); background: rgba(255,255,255,0.06); }

.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.05rem; padding: 6px; line-height: 1;
}

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 10px; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; font-size: 0.88rem; }
.check input { accent-color: var(--orange); width: 15px; height: 15px; }
.auth-link { background: none; border: none; cursor: pointer; color: var(--orange-2); font: inherit; font-size: 0.88rem; padding: 0; }
.auth-link:hover { text-decoration: underline; }

.auth-error { color: #ff9a9a; min-height: 1.25em; font-size: 0.87rem; margin: 6px 0 12px; }
.auth-submit { width: 100%; margin-top: 4px; }

.demo-hint {
  margin-top: 22px; padding: 13px 16px; border-radius: 14px;
  background: rgba(255,122,26,0.08); border: 1px dashed rgba(255,122,26,0.35);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 0.86rem; color: var(--muted);
}
.demo-hint > span { font-weight: 600; color: var(--orange-2); }
.demo-hint b { color: #fff; }
.demo-hint .auth-link { margin-left: auto; }

.auth-alt { margin-top: 22px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.auth-alt a { color: var(--orange-2); }

/* error shake */
.shake { animation: shake 0.4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-card-logo { display: inline-grid; }
}

/* ---------- Google sign-in ---------- */
#gisContainer { display: flex; justify-content: center; }
#gisContainer:not(:empty) { margin-bottom: 6px; }
.google-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 13px 18px; border-radius: 12px; background: #fff; color: #1f2430;
  font-family: "Sora", sans-serif; font-weight: 600; font-size: 0.98rem;
  border: none; cursor: pointer; transition: transform 0.2s, box-shadow 0.3s;
}
.google-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px rgba(0,0,0,0.55); }
.google-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.google-note { margin-top: 12px; font-size: 0.8rem; color: var(--muted-2); text-align: center; }
.admin-switch { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--stroke); text-align: center; font-size: 0.9rem; color: var(--muted); }
.admin-switch a { color: var(--orange-2); }
