/* assets/css/base.css
 * Shared base styles for WorkLynx auth/public pages (login, register, etc.)
 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand:      #667eea;
  --brand-dark: #4f63c7;
  --grad:       linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --dark:       #0f172a;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--dark);
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Glow */
body::after {
  content: '';
  position: fixed;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(102,126,234,0.2) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Nav ── */
.nav {
  position: relative;
  z-index: 10;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
}
.logo img { width: 42px; height: 42px; }
.nav-back {
  font-size: 0.85rem;
  color: #475569;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-back:hover { color: white; }

/* ── Main ── */
main {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1040px;
  width: 100%;
  align-items: start;
}

/* ── Left: copy ── */
.copy { padding-top: 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(102,126,234,0.15);
  border: 1px solid rgba(102,126,234,0.4);
  color: #a5b4fc;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.badge-dot {
  width: 6px; height: 6px;
  background: #a5b4fc;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.copy h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.copy h1 span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.copy p {
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 36px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #64748b;
  font-size: 0.9rem;
}

.feature-icon {
  width: 36px; height: 36px;
  background: rgba(102,126,234,0.1);
  border: 1px solid rgba(102,126,234,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Right: form card ── */
.form-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 40px 36px;
  backdrop-filter: blur(12px);
}

.form-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-sub {
  color: #64748b;
  font-size: 0.88rem;
  margin-bottom: 28px;
  line-height: 1.5;
}

.field { margin-bottom: 18px; }

.field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}

.field label a {
  color: #a5b4fc;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.8rem;
  transition: color 0.2s;
}
.field label a:hover { color: white; }

.field input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9px;
  color: white;
  font-size: 0.93rem;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.field input::placeholder { color: #475569; }

.field input:focus {
  border-color: rgba(102,126,234,0.6);
  background: rgba(102,126,234,0.08);
}

.submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--grad);
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(102,126,234,0.35);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102,126,234,0.45);
}
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Alert */
.wl-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.wl-alert--error {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.3);
  color: #fca5a5;
}
.wl-alert--success {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.3);
  color: #86efac;
}

.form-footer {
  text-align: center;
  color: #475569;
  font-size: 0.82rem;
  margin-top: 20px;
}
.form-footer a {
  color: #a5b4fc;
  text-decoration: none;
  font-weight: 500;
}
.form-footer a:hover { color: white; }

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px 20px;
  color: #1e293b;
  font-size: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
footer a { color: #334155; text-decoration: none; }
footer a:hover { color: #64748b; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .copy { display: none; }
  .nav { padding: 16px 20px; }
  .form-card { padding: 30px 22px; }
}
