/* ═══════════════════════════════════════════
   AUTH.CSS — Login, Register, Forgot Password
   CyberEduc
═══════════════════════════════════════════ */

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0,255,136,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* ══════════════════════════
   AUTH PAGE LAYOUT
══════════════════════════ */
.auth-page {
  min-height: calc(100vh - 68px);
  margin-top: 68px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Centered variant — for forgot password */
.auth-page--centered {
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  padding: 60px 24px;
}

/* ══════════════════════════
   LEFT PANEL — Branding
══════════════════════════ */
.auth-left {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 64px;
  position: relative;
  overflow: hidden;
}

/* Glow effect */
.auth-left::before {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,255,136,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.auth-left-inner {
  max-width: 400px;
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
}

.auth-headline {
  font-size: clamp(28px, 3vw, 40px);
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.auth-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.af-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--bg-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════
   RIGHT PANEL — Form
══════════════════════════ */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 64px;
}

/* ══════════════════════════
   AUTH CARD
══════════════════════════ */
.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card--narrow {
  max-width: 400px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: 0 32px 64px rgba(0,0,0,0.3);
}

.auth-card-header {
  margin-bottom: 32px;
}

.auth-icon-wrap {
  font-size: 40px;
  margin-bottom: 20px;
  display: block;
}

.auth-icon-wrap--green {
  filter: drop-shadow(0 0 12px var(--green-glow));
}

.auth-title {
  font-size: 28px;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.auth-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ══════════════════════════
   ERROR BANNER
══════════════════════════ */
.auth-error {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,68,85,0.08);
  border: 1px solid rgba(255,68,85,0.25);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--red);
}

.auth-error-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ══════════════════════════
   FORM ELEMENTS
══════════════════════════ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Side by side row (first + last name) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text);
  transition: var(--transition);
  outline: none;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow-s);
  background: var(--bg-2);
}

.form-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255,68,85,0.08);
}

/* Input with eye toggle */
.input-wrap {
  position: relative;
}

.input-wrap .form-input {
  padding-right: 48px;
}

.input-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.5;
  transition: var(--transition);
  padding: 4px;
  line-height: 1;
}

.input-eye:hover {
  opacity: 1;
}

/* Password strength */
.pwd-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.pwd-bar {
  flex: 1;
  height: 3px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}

.pwd-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}

.pwd-fill.weak   { background: var(--red);    width: 33%; }
.pwd-fill.medium { background: var(--yellow);  width: 66%; }
.pwd-fill.strong { background: var(--green);   width: 100%; }

.pwd-label {
  font-family: var(--font-mono);
  font-size: 11px;
  min-width: 48px;
  text-align: right;
}

.pwd-label.weak   { color: var(--red); }
.pwd-label.medium { color: var(--yellow); }
.pwd-label.strong { color: var(--green); }

/* Checkbox */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
  flex-shrink: 0;
}

.form-check label {
  cursor: pointer;
  line-height: 1.4;
}

/* Links inside form */
.form-link {
  font-size: 13px;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.form-link:hover {
  color: var(--green-dim);
  text-decoration: underline;
}

/* Full width button */
.btn-full {
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 15px;
}

/* Inline button (looks like link) */
.btn-inline {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-display);
}

/* ══════════════════════════
   DIVIDER
══════════════════════════ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
  color: var(--text-dim);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ══════════════════════════
   SWITCH LINK
══════════════════════════ */
.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* ══════════════════════════
   SENT INFO (forgot password)
══════════════════════════ */
.sent-info {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 24px;
}

/* ══════════════════════════
   RESPONSIVE
══════════════════════════ */
@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-left {
    display: none;
  }

  .auth-right {
    padding: 40px 24px;
    min-height: calc(100vh - 68px);
  }
}

@media (max-width: 480px) {
  .auth-right  { padding: 24px 16px; }
  .form-row    { grid-template-columns: 1fr; }
  .auth-card--narrow { padding: 32px 24px; }
}
