/* =============================================
   login/login.css — SwipeWork
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --primary:        #3b82f6;
  --primary-dark:   #2563eb;
  --primary-light:  #dbeafe;
  --danger:         #ef4444;
  --danger-light:   #fef2f2;
  --danger-border:  #fecaca;
  --text-dark:      #1e293b;
  --text-mid:       #475569;
  --text-light:     #94a3b8;
  --border:         #e2e8f0;
  --bg-input:       #f8fafc;
  --white:          #ffffff;
  --facebook-blue:  #1877f2;
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.18);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.12);
  --radius:         12px;
  --radius-sm:      8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

h3 {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
  margin-bottom: 14px;
}

.footer-note {
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  text-align: center;
  margin-top: 14px;
}

/* ---- Card ---- */
.overlay-container { width: 100%; max-width: 420px; }

.overlay-content {
  background: var(--white);
  border-radius: 20px;
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-lg);
}

/* ---- Social Buttons ---- */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  border: 2px solid transparent;
}

.btn-social:hover  { transform: translateY(-1px); box-shadow: var(--shadow-md); opacity: 0.93; }
.btn-social:active { transform: translateY(0); }

.btn-google { background: var(--white); color: var(--text-dark); border-color: var(--border); }
.btn-google img { width: 18px; height: 18px; }
.btn-facebook { background: var(--facebook-blue); color: var(--white); }
.btn-facebook i { font-size: 16px; }

/* ---- Divider ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---- Input Groups ---- */
.input-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  margin-bottom: 4px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
  background: var(--white);
}

.input-group.error-state {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
  background: var(--danger-light);
}

.input-group i {
  color: var(--text-light);
  font-size: 13px;
  width: 18px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.input-group:focus-within i { color: var(--primary); }
.input-group.error-state i  { color: var(--danger); }

input[type="text"],
input[type="password"] {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 10px 8px;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  color: var(--text-dark);
}

input::placeholder { color: var(--text-light); }

/* ---- Show/Hide password toggle ---- */
.toggle-password {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-light);
  font-size: 13px;
  transition: color 0.2s;
  width: auto;
}
.toggle-password:hover { color: var(--primary); }

/* ---- Field Error ---- */
.field-error {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--danger);
  padding: 3px 4px 8px 4px;
  display: none;
  animation: fadeInDown 0.2s ease;
}
.field-error::before { content: '⚠ '; }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Form footer (remember me + forgot) ---- */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  margin-top: 6px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 600;
}

.remember-me input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

/* ---- Submit Button ---- */
button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

button[type="submit"]:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}
button[type="submit"]:active:not(:disabled) { transform: translateY(0); }
button[type="submit"]:disabled { background: #93c5fd; cursor: not-allowed; opacity: 0.7; }

/* ---- Popups ---- */
.popup {
  padding: 10px 14px;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  display: none;
}

.error-popup   { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }
.success-popup { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ---- Register link ---- */
.register-link { text-align: center; font-size: 13px; color: var(--text-mid); margin-top: 14px; }
.register-link a { color: var(--primary); font-weight: 700; text-decoration: none; }
.register-link a:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .overlay-content { padding: 20px 14px 18px; }
}

@media (min-width: 768px) {
  .overlay-content { padding: 32px 30px 26px; }
  input[type="text"], input[type="password"] { font-size: 15px; padding: 12px 8px; }
}