/* =============================================
   LOGIN MODAL
   ============================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.modal-open {
  display: flex;
}

.modal {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: #fee2e2;
  border-radius: 50%;
  font-size: 0.8rem;
  cursor: pointer;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.15s;
}

.modal-close:hover {
  background: #fecaca;
}

.modal-header {
  margin-bottom: 24px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 0.875rem;
  color: #6b7280;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

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

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.form-input {
  padding: 11px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #1f2937;
  font-family: inherit;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-error {
  background: #fee2e2;
  color: #ef4444;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 10px;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: #16a34a;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-submit:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.modal-footer-text {
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}

.modal-link {
  color: #16a34a;
  font-weight: 600;
  text-decoration: none;
}

.modal-link:hover {
  text-decoration: underline;
}
