/* ============================================================
   KnockTask — Auth Pages (Light Theme)
   ============================================================ */

@import url('theme.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-2);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,87,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  bottom: -200px; right: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,200,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-md);
}

.auth-logo { display: flex; justify-content: center; margin-bottom: 28px; text-decoration: none; }

.auth-title { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 6px; letter-spacing: -0.03em; }
.auth-sub   { font-size: 0.875rem; color: var(--text-2); text-align: center; margin-bottom: 28px; }

/* Role Tabs */
.role-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
.role-tab {
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: var(--t);
}
.role-tab.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.role-tab:hover:not(.active) { border-color: var(--text-3); color: var(--text-1); }

/* Fields */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--text-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.field input,
.field select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  color: var(--text-1);
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: var(--text-3); }
.field input:focus,
.field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,87,255,0.1); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Submit */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--grad-a);
  border: none;
  border-radius: var(--r);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: var(--t);
  box-shadow: 0 4px 16px rgba(0,87,255,0.3);
}
.btn-submit:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,87,255,0.35); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Error */
.auth-error {
  background: rgba(220,38,38,0.06);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--r);
  color: #dc2626;
  font-size: 0.85rem;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: none;
}
.auth-error.show { display: block; }

/* Links */
.auth-link { text-align: center; margin-top: 20px; font-size: 0.875rem; color: var(--text-2); }
.auth-link a { color: var(--primary); font-weight: 700; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-3); font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Store fields */
.store-fields { display: none; }
.store-fields.show { display: block; }

/* Success */
.auth-success { text-align: center; padding: 20px 0; display: none; }
.auth-success.show { display: block; }
.auth-success-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--primary-light); border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); margin: 0 auto 20px;
}
.auth-success h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.auth-success p { color: var(--text-2); font-size: 0.9rem; line-height: 1.6; }

/* Role tab SVG alignment */
.role-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 24px 16px; }
  .field-row { grid-template-columns: 1fr; }
  .auth-title { font-size: 1.3rem; }
}
@media (max-width: 360px) {
  body { padding: 12px; }
  .auth-card { padding: 20px 14px; }
  .role-tabs { gap: 6px; }
  .role-tab { font-size: 0.82rem; padding: 10px 8px; }
}
