/* public/css/auth.css — Đăng nhập / Đăng ký: thẻ trắng trên nền xanh nhạt
   (token & font kế thừa từ academic.css đã nạp toàn cục trong layout) */

/* Lớp bọc ngoài để căn giữa trong Layout */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  background-color: var(--paper);
  padding: 48px 20px;
  font-family: var(--serif-body);
}

.auth-container {
  position: relative;
  background: var(--paper-raised);
  padding: 38px 34px 32px;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  border: 1px solid var(--rule);
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.auth-container > * { position: relative; }

.auth-header {
  margin-bottom: 26px;
}
/* Nhãn nhỏ phía trên tiêu đề */
.auth-header::before {
  content: "Luyện Đề";
  display: inline-block;
  font-family: var(--serif-body);
  font-size: .8rem; font-weight: 600;
  color: var(--blue-deep); background: var(--blue-tint);
  border-radius: 999px; padding: 4px 12px;
  margin-bottom: 14px;
}
.auth-header h1 {
  font-family: var(--serif-display);
  color: var(--ink);
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.auth-header p {
  color: var(--ink-soft);
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.55;
}

.form-group {
  margin-bottom: 18px;
  text-align: left;
}
.form-group label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  font-size: 15px;
  font-family: var(--serif-body);
  color: var(--ink);
  box-sizing: border-box;
  transition: all 0.25s ease;
  background-color: var(--paper);
}
.form-input::placeholder { color: var(--ink-faint); }
.form-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
  background-color: #fff;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  margin-top: 4px;
  background-color: var(--blue);
  color: #fff;
  border: 1px solid var(--blue);
  border-radius: var(--r);
  font-size: 16px;
  font-family: var(--serif-body);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background-color: var(--blue-deep);
  border-color: var(--blue-deep);
  color: #fff;
  box-shadow: var(--sh-1);
}

.btn-loading {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Đăng nhập bằng Google */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  font-size: 15px;
  font-family: var(--serif-body);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-google:hover { background: var(--paper-deep); border-color: #b6c3d6; color: var(--ink); box-shadow: var(--sh-1); }
.btn-google:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn-google svg { width: 18px; height: 18px; flex-shrink: 0; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-faint); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.auth-note { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-faint); text-align: center; line-height: 1.5; }

/* Thông báo lỗi/thành công */
.alert {
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: var(--r);
  font-size: 14px;
  display: none;
  font-weight: 500;
  text-align: left;
}
.alert-error { background-color: var(--error-tint); color: #b91c1c; border: 1px solid #f5c2c2; }
.alert-success { background-color: var(--forest-tint); color: var(--forest); border: 1px solid #bfe3cb; }

/* Link chuyển trang */
.auth-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-soft);
}
.auth-footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}
.auth-footer a:hover {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
