:root {
  --pt-purple: #7c3aed;
  --pt-purple-dark: #6d28d9;
  --pt-bg-1: #667eea;
  --pt-bg-2: #764ba2;
}

* { box-sizing: border-box; }

body.pt-auth-body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Keep the page background neutral/white. Only the elevated card is themed. */
  background: #ffffff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pt-auth-body {
  --pt-accent-1: #7c3aed;
  --pt-accent-2: #a78bfa;
  --pt-card-tint: rgba(124, 58, 237, 0.08);
}
.pt-auth-body.pt-auth-student { --pt-accent-1: #2563eb; --pt-accent-2: #60a5fa; --pt-card-tint: rgba(37, 99, 235, 0.08); }
.pt-auth-body.pt-auth-user { --pt-accent-1: #7c3aed; --pt-accent-2: #a78bfa; --pt-card-tint: rgba(124, 58, 237, 0.08); }
.pt-auth-body.pt-auth-parent { --pt-accent-1: #059669; --pt-accent-2: #34d399; --pt-card-tint: rgba(5, 150, 105, 0.08); }
.pt-auth-body.pt-auth-tutor { --pt-accent-1: #d97706; --pt-accent-2: #fbbf24; --pt-card-tint: rgba(217, 119, 6, 0.10); }
.pt-auth-body.pt-auth-admin { --pt-accent-1: #0f172a; --pt-accent-2: #64748b; --pt-card-tint: rgba(15, 23, 42, 0.10); }
.pt-auth-body.pt-auth-generic { --pt-accent-1: #4f46e5; --pt-accent-2: #818cf8; --pt-card-tint: rgba(79, 70, 229, 0.10); }

.pt-auth-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--pt-card-tint) 0%, #ffffff 42%);
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  padding: 38px;
  box-shadow: 0 14px 50px rgba(0,0,0,0.22);
  position: relative;
  overflow: hidden;
}
.pt-auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--pt-accent-1), var(--pt-accent-2));
}

.pt-auth-header {
  text-align: center;
  margin-bottom: 26px;
}

.pt-auth-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 30px;
  line-height: 1.1;
  color: var(--pt-accent-1);
  margin: 0 0 6px 0;
  font-weight: 800;
}

.pt-auth-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.pt-auth-icon {
  font-size: 28px;
  line-height: 1;
}

.pt-auth-message {
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  display: none;
}
.pt-auth-message.error {
  display: block !important;
  background: #fee;
  color: #c33;
  border: 1px solid #fcc;
}
.pt-auth-message.success {
  display: block !important;
  background: #efe;
  color: #17803d;
  border: 1px solid #cfc;
}

.pt-auth-group { margin-bottom: 16px; }
.pt-auth-group label {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-weight: 600;
  font-size: 14px;
}

.pt-auth-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s;
}
.pt-auth-group input:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.8);
  background: #ffffff;
}

.pt-auth-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: var(--pt-accent-1);
  transition: transform 0.08s ease, background 0.2s;
  margin-top: 6px;
}
.pt-auth-btn:hover { filter: brightness(0.95); }
.pt-auth-btn:active { transform: translateY(1px); }
.pt-auth-btn:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }

.pt-auth-btn.pt-auth-btn-secondary {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
}
.pt-auth-btn.pt-auth-btn-secondary:hover { background: rgba(15, 23, 42, 0.12); }

.pt-auth-footer {
  text-align: center;
  margin-top: 18px;
  color: #6b7280;
  font-size: 14px;
}

.pt-auth-footer a {
  color: var(--pt-accent-1);
  text-decoration: none;
  font-weight: 800;
}
.pt-auth-footer a:hover { text-decoration: underline; }

.pt-auth-footer .pt-auth-home {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
}

/* Login-failed "error page" panel (inside the card) */
.pt-auth-error-panel {
  display: none;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.06);
  margin-bottom: 16px;
}
.pt-auth-error-title {
  font-weight: 900;
  color: #991b1b;
  margin-bottom: 6px;
}
.pt-auth-error-detail {
  color: #7f1d1d;
  font-size: 14px;
  margin-bottom: 10px;
}
.pt-auth-error-hint {
  color: #475569;
  font-size: 13px;
  margin-bottom: 10px;
}
.pt-auth-error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 12px;
}
.pt-auth-error-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: #0f172a;
  font-weight: 800;
  text-decoration: none;
  font-size: 13px;
}
.pt-auth-error-links a:hover {
  border-color: rgba(124, 58, 237, 0.25);
}


